summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* nv_init: tool to run full init/takedown sequenceBen Skeggs2013-04-152-1/+43
| | | | | | Useful for debugging. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/nvc0: ignore readback page alloc failure to support userspaceBen Skeggs2013-04-151-8/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp: fix uninitialised eq_done in error pathBen Skeggs2013-04-151-1/+1
| | | | | Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* v3.9-rc7Ben Skeggs2013-04-152-0/+23
|
* drm: fix unconditional return waiting on memoryCalvin Owens2013-04-091-1/+1
| | | | | | | | Typo in nv50_display_flip_wait allows page flipping to run ahead before memory has time to settle. Signed-off-by: Calvin Owens <jcalvinowens@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: fix NULL ptr dereference from nv50_disp_intr()Maarten Lankhorst2013-03-292-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op 23-03-13 12:47, Peter Hurley schreef: > On Tue, 2013-03-19 at 11:13 -0400, Peter Hurley wrote: >> On vanilla 3.9.0-rc3, I get this 100% repeatable oops after login when >> the user X session is coming up: > Perhaps I wasn't clear that this happens on every boot and is a > regression from 3.8 > > I'd be happy to help resolve this but time is of the essence; it would > be a shame to have to revert all of this for 3.9 Well it broke on my system too, so it was easy to fix. I didn't even need gdm to trigger it! >8---- This fixes regression caused by 1d7c71a3e2f7 (drm/nouveau/disp: port vblank handling to event interface), which causes a oops in the following way: BUG: unable to handle kernel NULL pointer dereference at 0000000000000001 IP: [<0000000000000001>] 0x0 PGD 0 Oops: 0010 [#1] PREEMPT SMP Modules linked in: ip6table_filter ip6_tables ebtable_nat ebtables ...<snip>... CPU 3 Pid: 0, comm: swapper/3 Not tainted 3.9.0-rc3-xeon #rc3 Dell Inc. Precision WorkStation T5400 /0RW203 RIP: 0010:[<0000000000000001>] [<0000000000000001>] 0x0 RSP: 0018:ffff8802afcc3d80 EFLAGS: 00010087 RAX: ffff88029f6e5808 RBX: 0000000000000001 RCX: 0000000000000000 RDX: 0000000000000096 RSI: 0000000000000001 RDI: ffff88029f6e5808 RBP: ffff8802afcc3dc8 R08: 0000000000000000 R09: 0000000000000004 R10: 000000000000002c R11: ffff88029e559a98 R12: ffff8802a376cb78 R13: ffff88029f6e57e0 R14: ffff88029f6e57f8 R15: ffff88029f6e5808 FS: 0000000000000000(0000) GS:ffff8802afcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000000000001 CR3: 000000029fa67000 CR4: 00000000000007e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper/3 (pid: 0, threadinfo ffff8802a355e000, task ffff8802a3535c40) Stack: ffffffffa0159d8a 0000000000000082 ffff88029f6e5820 0000000000000001 ffff88029f71aa00 0000000000000000 0000000000000000 0000000004000000 0000000004000000 ffff8802afcc3e38 ffffffffa01843b5 ffff8802afcc3df8 Call Trace: <IRQ> [<ffffffffa0159d8a>] ? nouveau_event_trigger+0xaa/0xe0 [nouveau] [<ffffffffa01843b5>] nv50_disp_intr+0xc5/0x200 [nouveau] [<ffffffff816fbacc>] ? _raw_spin_unlock_irqrestore+0x2c/0x50 [<ffffffff816ff98d>] ? notifier_call_chain+0x4d/0x70 [<ffffffffa017a105>] nouveau_mc_intr+0xb5/0x110 [nouveau] [<ffffffffa01d45ff>] nouveau_irq_handler+0x6f/0x80 [nouveau] [<ffffffff810eec95>] handle_irq_event_percpu+0x75/0x260 [<ffffffff810eeec8>] handle_irq_event+0x48/0x70 [<ffffffff810f205a>] handle_fasteoi_irq+0x5a/0x100 [<ffffffff810182f2>] handle_irq+0x22/0x40 [<ffffffff8170561a>] do_IRQ+0x5a/0xd0 [<ffffffff816fc2ad>] common_interrupt+0x6d/0x6d <EOI> [<ffffffff810449b6>] ? native_safe_halt+0x6/0x10 [<ffffffff8101ea1d>] default_idle+0x3d/0x170 [<ffffffff8101f736>] cpu_idle+0x116/0x130 [<ffffffff816e2a06>] start_secondary+0x251/0x258 Code: Bad RIP value. RIP [<0000000000000001>] 0x0 RSP <ffff8802afcc3d80> CR2: 0000000000000001 ---[ end trace 907323cb8ce6f301 ]--- Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: fix handling empty channel list in ioctl'sMaarten Lankhorst2013-03-291-8/+10
| | | | | | | | | | | | | | If there are no channels, chan would never end up being NULL, and so the null pointer check would fail. Solve this by initializing chan to NULL, and iterating over temp instead. Fixes oops when running intel-gpu-tools/tests/kms_flip, which attempts to do some intel ioctl's on a nouveau device. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: stable@vger.kernel.org [3.7+] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: prevent lockdep false-positive in page flipping pathBen Skeggs2013-03-191-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: fix return value of nouveau_object_del()Ben Skeggs2013-03-191-2/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* hwmon: do not expose a buggy temperature if it is unavailableMartin Peres2013-03-181-13/+31
| | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm: display the availability of the internal sensorMartin Peres2013-03-183-0/+13
| | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm: disable temperature management if the sensor isn't readableMartin Peres2013-03-181-1/+1
| | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm: disable auto fan management if temperature is not availableMartin Peres2013-03-181-0/+5
| | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv40/therm: reserve negative temperatures for errorsMartin Peres2013-03-181-0/+4
| | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv40/therm: disable temperature reading if the bios misses some parametersMartin Peres2013-03-182-15/+4
| | | | | | | Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm-ic: the temperature is off by sensor_constant, warn the userMartin Peres2013-03-182-3/+5
| | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm: remove some confusion introduced by therm_modeMartin Peres2013-03-184-8/+8
| | | | | | | | | | The kernel message "[ PTHERM][0000:01:00.0] Thermal management: disabled" is misleading as it actually means "fan management: disabled". This patch fixes both the source and the message to improve readability. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* therm: do not make assumptions on temperatureMartin Peres2013-03-181-3/+3
| | | | | | | | | | | | In nouveau_therm_sensor_event, temperature is stored as an uint8_t even though the original interface returns an int. This change should make it more obvious when the sensor is either very-ill-calibrated or when we selected the wrong sensor style on the nv40 family. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv40/therm: increase the sensor's settling delay to 20msMartin Peres2013-03-181-1/+2
| | | | | | | | | | | | | Based on my experience, 10ms wasn't always enough. Let's bump that to a little more. If this turns out to be insufficient-enough again, then an approach based on letting the sensor settle for several seconds before starting polling on the temperature would be better suited. This way, boot time wouldn't be impacted by those waits too much. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv40/therm: improve selection between the old and the new styleMartin Peres2013-03-181-12/+38
| | | | | | | | | | | | The condition to select between the old and new style was a thinko as rnndb orders chipsets based on their release date (or general chronologie hw-wise) and not based on their chipset number. As the nv40 family is a mess when it comes to numbers, this patch introduces a switch-based selection between the old and new style. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv50: use correct tiling methods for m2mf buffer movesMarcin Slusarz2013-03-111-2/+2
| | | | | | | Currently used only on original nv50, nvaa and nvac. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: idle channel before releasing notify objectMarcin Slusarz2013-03-111-0/+5
| | | | | | | | Unmapping it while it's still in use (e.g. by M2MF) can lead to page faults and a lot of TRAP_M2MF spam in dmesg. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: fix regression in vblankingMaarten Lankhorst2013-03-111-2/+2
| | | | | | | | | | | nv50_vblank_enable/disable got switched from NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_0 (4) << head to 1 << head, which is wrong. 4 << head is the correct value. Fixes regression with vblanking since 1d7c71a3e2f77 "drm/nouveau/disp: port vblank handling to event interface" Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: encoder creation failure doesn't mean full init failureBen Skeggs2013-03-111-0/+1
| | | | | | It's meant as a notification only, not a fatal error. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: prevent some races between modesetting and page flippingBen Skeggs2013-03-041-83/+106
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c: drop parent refcount when creating portsBen Skeggs2013-03-041-0/+1
| | | | | | | | Fixes issue where i2c subdev never gets destroyed due to its subobjects holding references. This will mean the i2c subdev refcount goes negative during its destruction, but this isn't an issue in practice. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv84: fix regression in page flippingBen Skeggs2013-03-041-6/+14
| | | | | | | Need to emit the semaphore ctxdma before trying to use the semaphore operations. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Fix typo in init_idx_addr_latched().Francisco Jerez2013-03-041-1/+1
| | | | | | | Fixes script-based modesetting on some LVDS panels. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Disable AGP on PowerPC again.Francisco Jerez2013-03-041-0/+12
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* graph/nve0: some random reg moved on keplerBen Skeggs2013-03-041-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* v3.9-rc1Ben Skeggs2013-03-0415-230/+104
|
* restore debugfs/vbios.rom supportMarcin Slusarz2013-03-044-0/+93
| | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
* kms/nv50-: remove UPDATE methods after each encoder disconnectBen Skeggs2013-03-041-9/+0
| | | | | | | Supervisor can now handle more than one operation within a single series of interrupts. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nvd0: handle multiple actions from one set of supervisor intrsBen Skeggs2013-03-041-103/+118
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50: handle multiple actions from one set of supervisor intrsBen Skeggs2013-03-041-108/+118
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c: add support for ddc/aux, and dp link training on anx9805Ben Skeggs2013-02-207-1/+336
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv50: initial kms support for off-chip TMDS/DP encodersBen Skeggs2013-02-202-18/+202
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50: initial supervisor support for off-chip encodersBen Skeggs2013-02-202-33/+100
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50: initial work towards supporting external encodersBen Skeggs2013-02-2012-0/+199
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50-: remove unnecessary wait-for-completion pointsBen Skeggs2013-02-201-10/+2
| | | | | | | DP link training is now handled as part of the supervisor processing, and can no longer race with it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: move DP link training to core and train from supervisorBen Skeggs2013-02-2018-555/+573
| | | | | | | | | | | | | | | We need to be able to do link training for PIOR-connected ANX9805 from the third supervisor handler (due to script ordering in the bios, can't have the "user" call train because some settings are overwritten from the modesetting bios scripts). This moves link training for SOR-connected DP encoders to the second supervisor interrupt, *before* we call the modesetting scripts (yes, different ordering from PIOR is necessary). This is useful since we should now be able to remove some hacks to workaround races between the supervisor and link training paths. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv_aux: tool to access dp aux channelsBen Skeggs2013-02-202-1/+119
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv_i2c: add tool to access i2c bussesBen Skeggs2013-02-202-1/+152
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: handle supervisor tasks from workqueueBen Skeggs2013-02-209-32/+53
| | | | | | i2c_algo_bit sleeps... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c: create proper chipset-specific class implementationsBen Skeggs2013-02-2028-396/+1102
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: 0x0000 is a valid udisp config valueBen Skeggs2013-02-202-17/+14
| | | | | | | Return an out-of-range value instead to signal a failure from exec_clkcmp(). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* devinit/nv50: reverse the logic for running encoder init scriptsBen Skeggs2013-02-201-6/+8
| | | | | | | | A single U encoder table can match multiple DCB entries, whereas the reverse is not true and can lead to us not matching a DCB entry at all, and fail to initialise some encoders. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: store a type/mask hash in parsed dcb dataBen Skeggs2013-02-202-13/+18
| | | | | | | Matches format used by a couple of other vbios tables, useful to have laying around already calculated. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c: extend type to 16-bits, add lookup-by-type functionBen Skeggs2013-02-202-1/+16
| | | | | | | | For off-chip transmitters we won't necessarily have an i2c table entry to lookup, but we can do it instead by encoding the type to include the extdev type and looking that up instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c: aux channels not necessarily on nvioBen Skeggs2013-02-207-149/+196
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>