aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAge
* drm/nv84-/fence: prepare for emit/sync support of sysram sequencesBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fence: make internal hooks part of the contextBen Skeggs2013-02-20
| | | | | | | A step towards being able to provide fences from other engines not connected to PFIFO. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv17/fence: split from nv10 codeBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv84-/fence: abstract class emit/sync functions to virt+sequenceBen Skeggs2013-02-20
| | | | | | | Now can be used to operate on any buffer mapped into the GPU virtual address and not just the main inter-channel sync buffer. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv84/fence: access fences with full virtual address, not offsetBen Skeggs2013-02-20
| | | | | | | | Allows most of the code to be shared between nv84/nvc0 implementations, and paves the way for doing emit/sync on non-VRAM buffers (multi-gpu, dma-buf). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio/nve0: interrupt regs moved on kepler apparentlyBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: use event interfaces for interrupt signallingBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: pass number of on-die gpio lines to baseBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/drm: store full dcb gpio function data in connectorBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fence/nv84-: put processes to sleep while waiting on fencesBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo/nvc0: bash some magic reg to make uevent interrupt workBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo/nv84: support user event triggerBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo/nvc0-: use interrupt 31 as an event triggerBen Skeggs2013-02-20
| | | | | | | Generated if you try and use fifo method 0x20 on any subchannel, appears that it can be safely masked off without stalling the whole GPU. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp: port vblank handling to event interfaceBen Skeggs2013-02-20
| | | | | | | | | This removes the nastiness with the interactions between display and software engines when handling vblank semaphore release interrupts. Now, all the semantics are handled in one place (sw) \o/. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/nv04: implement a base display object classBen Skeggs2013-02-20
| | | | | | Will be used for upcoming vblank event interfaces. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: basic event interface between core and drmBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo/nvc0: improve interrupt handler somewhatBen Skeggs2013-02-20
| | | | | | | Logs extra info for interrupts that have a sub-status register, and handles the "special" ack from INTR bit 31. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/disp: fix missing sor modectrl sync flagsBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: reduce stack usage of nouveau_therm_ic_ctorMarcin Slusarz2013-02-20
| | | | | | | | Before: 1496 bytes After: 152 bytes Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: use workqueue to shutdown the machineMarcin Slusarz2013-02-20
| | | | | | | | orderly_poweroff cannot be called from atomic context. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv40/therm: reset temperature sensor on initMarcin Slusarz2013-02-20
| | | | | | | | | | | | Current uninitialized sensor detection does not work for me on nv4b and sensor returns crazy values (>190°C). It stabilises later, but it's too late - therm code shutdowns the machine... Let's just reset it on init. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: turn on fan only when threshold hit in positive directionMarcin Slusarz2013-02-20
| | | | | | | | + the same for shutdown threshold - seems impossible, but shutdown can fail. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: report channel owner in ioctl error pathsMarcin Slusarz2013-02-20
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: always initialize alarm_program_lockMarcin Slusarz2013-02-20
| | | | | | | | | | Fixes "BUG: spinlock bad magic" on module load for nva3+ cards. Introduced in commit "drm/nouveau/therm: implement support for temperature alarms". Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: handle backlight_device_register failureMarcin Slusarz2013-02-20
| | | | | | | Found by smatch. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use kmemdup for edid allocation/copyingMarcin Slusarz2013-02-20
| | | | | | | Avoids potential null pointer dereference. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use drm_property_create_range helperMarcin Slusarz2013-02-20
| | | | | | | Avoids potential null pointer dereference. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove unnecessary null pointer check from nouveau_fence_newCong Ding2013-02-20
| | | | | | | | | the variable chan is dereferenced in line 190, so it is no reason to check null again in line 198. Signed-off-by: Cong Ding <dinggnu@gmail.com> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/graph: remove redundant null checksMarcin Slusarz2013-02-20
| | | | | | | | | It's safe to call kfree(NULL). Found by smatch. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fan: fix selection of fan speed when fan->get returns an errorMarcin Slusarz2013-02-20
| | | | | | | | | | | fan->get returns int, but we write it to unsigned variable, and then check whether it's >= 0 (it always is) Found by smatch: drivers/gpu/drm/nouveau/core/subdev/therm/fan.c:61 nouveau_fan_update() warn: always true condition '(duty >= 0) => (0-u32max >= 0)' Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: quiet static-related sparse noiseMarcin Slusarz2013-02-20
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: tiny debugging messages fixesMarcin Slusarz2013-02-20
| | | | | | | | COPY_ZM_REG: destination and source addresses were swapped RAM_RESTRICT_ZM_REG_GROUP: missing 0x prefix for register address Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: mark nv_printk_ as printf-like functionMarcin Slusarz2013-02-20
| | | | | | | ...and fix all warnings Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: share fence structures between nv10+ and nv50 implementationsMarcin Slusarz2013-02-20
| | | | | | | We already rely on them having the same fields and layout. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fan: handle the cases where we are outside of the linear zoneMartin Peres2013-02-20
| | | | | | | | | | | | | This fixes a bug where, when temperature is outside of the linear range, fan pwm would be outside of the allowed range ([0, 100]) and could get negative in some cases. It seems like a regression that happened when we re-worked the fan management logic before merging. Tested-by: Ozan Çağlayan <ozancag@gmail.com> Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: report channel owner in error messagesMarcin Slusarz2013-02-20
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: prepare for reporting channel ownerMarcin Slusarz2013-02-20
| | | | | | | | | - record channel owner process name - add some helpers for accessing this information - let nouveau_enum hold additional value (will be needed in the next patch) Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use pr_contMarcin Slusarz2013-02-20
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: split fifo interrupt handlerMarcin Slusarz2013-02-20
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: force a minimum hysteresis on temperature alarm thresholdsMartin Peres2013-02-20
| | | | | | | | | | | This should avoid the situation where a user gets its kernel logs flooded when temperature oscillates around a threshold with 0°C hysteresis. This patch is just meant to fix broken vbios (as reported on a nv4e on sysfs hwmon interface. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: set legacy bios data before parsing the structureEmil Velikov2013-02-20
| | | | | | | | | | Commit 767baf82 drm/nouveau: remove some more unnecessary legacy bios code has introduced a regression my misplacing the code that sets the major/chip versions, which are used whist parsing the bmp/bit structure in vbios Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: don't try pwm/toggle control if GPIO_FAN is inputBen Skeggs2013-02-20
| | | | | | | My GTX660 has the GPIO_FAN function, but it's configured in input-mode; presumably to monitor the frequency set by an I2C fan controller? Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: rename DCB_GPIO_PWM_FAN to DCB_GPIO_FANBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: add support for parsing xpio table dataBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove some more unnecessary legacy bios codeBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove legacy vbios type detectionBen Skeggs2013-02-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/hwmon: create hwmon attributes under hwmon device in sysfsBen Skeggs2013-02-20
| | | | | | | From browsing my /sys, a few other things seem to do this, and it looks cleaner this way too :) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/hwmon: s/fan0/fan1/Ben Skeggs2013-02-20
| | | | | | Fan speed info now shown by sensors. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: better transitions and debug loggingBen Skeggs2013-02-20
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Martin Peres <martin.peres@labri.fr>
* drm/nouveau/hwmon: add missing alarm thresholdsMartin Peres2013-02-20
| | | | | | | | Expose all the hysteresis parameters + shutdown (emergency) + fan_boost (fixed pwm trip point). Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>