-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/…
…nouveau/linux-2.6 into drm-next Nothing terribly exciting in here probably: - reworked thermal stuff from mupuf/I, has a chance of possibly working well enough when we get to being able to reclock.. - driver will report mmio access faults on chipsets where it's supported - will now sleep waiting on fences on nv84+ rather than polling - some cleanup of the internal fencing, looking towards sli/dmabuf sync - initial support for anx9805 dp/tmds encoder - nv50+ display fixes related to the above, and also might fix a few other issues - nicer error reporting (will log process names with channel errors) - various other random fixes * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (87 commits) nouveau: ACPI support depends on X86 and X86_PLATFORM_DEVICES drm/nouveau/i2c: add support for ddc/aux, and dp link training on anx9805 drm/nv50: initial kms support for off-chip TMDS/DP encoders drm/nv50-/disp: initial supervisor support for off-chip encoders drm/nv50-/disp: initial work towards supporting external encoders drm/nv50-/kms: remove unnecessary wait-for-completion points drm/nv50-/disp: move DP link training to core and train from supervisor drm/nv50-/disp: handle supervisor tasks from workqueue drm/nouveau/i2c: create proper chipset-specific class implementations drm/nv50-/disp: 0x0000 is a valid udisp config value drm/nv50/devinit: reverse the logic for running encoder init scripts drm/nouveau/bios: store a type/mask hash in parsed dcb data drm/nouveau/i2c: extend type to 16-bits, add lookup-by-type function drm/nouveau/i2c: aux channels not necessarily on nvio drm/nouveau/i2c: fix a bit of a thinko in nv_wri2cr helper functions drm/nouveau/bios: parse external transmitter type if off-chip drm/nouveau: store i2c port pointer directly in nouveau_encoder drm/nouveau/i2c: handle i2c/aux mux outside of port lookup function drm/nv50/graph: avoid touching 400724, it doesn't exist drm/nouveau: Fix DPMS 1 on G4 Snowball, from snow white to coal black. ...
- Loading branch information
Showing
149 changed files
with
7,004 additions
and
2,740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Kernel driver nouveau | ||
=================== | ||
|
||
Supported chips: | ||
* NV43+ | ||
|
||
Authors: Martin Peres (mupuf) <martin.peres@labri.fr> | ||
|
||
Description | ||
--------- | ||
|
||
This driver allows to read the GPU core temperature, drive the GPU fan and | ||
set temperature alarms. | ||
|
||
Currently, due to the absence of in-kernel API to access HWMON drivers, Nouveau | ||
cannot access any of the i2c external monitoring chips it may find. If you | ||
have one of those, temperature and/or fan management through Nouveau's HWMON | ||
interface is likely not to work. This document may then not cover your situation | ||
entirely. | ||
|
||
Temperature management | ||
-------------------- | ||
|
||
Temperature is exposed under as a read-only HWMON attribute temp1_input. | ||
|
||
In order to protect the GPU from overheating, Nouveau supports 4 configurable | ||
temperature thresholds: | ||
|
||
* Fan_boost: Fan speed is set to 100% when reaching this temperature; | ||
* Downclock: The GPU will be downclocked to reduce its power dissipation; | ||
* Critical: The GPU is put on hold to further lower power dissipation; | ||
* Shutdown: Shut the computer down to protect your GPU. | ||
|
||
WARNING: Some of these thresholds may not be used by Nouveau depending | ||
on your chipset. | ||
|
||
The default value for these thresholds comes from the GPU's vbios. These | ||
thresholds can be configured thanks to the following HWMON attributes: | ||
|
||
* Fan_boost: temp1_auto_point1_temp and temp1_auto_point1_temp_hyst; | ||
* Downclock: temp1_max and temp1_max_hyst; | ||
* Critical: temp1_crit and temp1_crit_hyst; | ||
* Shutdown: temp1_emergency and temp1_emergency_hyst. | ||
|
||
NOTE: Remember that the values are stored as milli degrees Celcius. Don't forget | ||
to multiply! | ||
|
||
Fan management | ||
------------ | ||
|
||
Not all cards have a drivable fan. If you do, then the following HWMON | ||
attributes should be available: | ||
|
||
* pwm1_enable: Current fan management mode (NONE, MANUAL or AUTO); | ||
* pwm1: Current PWM value (power percentage); | ||
* pwm1_min: The minimum PWM speed allowed; | ||
* pwm1_max: The maximum PWM speed allowed (bypassed when hitting Fan_boost); | ||
|
||
You may also have the following attribute: | ||
|
||
* fan1_input: Speed in RPM of your fan. | ||
|
||
Your fan can be driven in different modes: | ||
|
||
* 0: The fan is left untouched; | ||
* 1: The fan can be driven in manual (use pwm1 to change the speed); | ||
* 2; The fan is driven automatically depending on the temperature. | ||
|
||
NOTE: Be sure to use the manual mode if you want to drive the fan speed manually | ||
|
||
NOTE2: Not all fan management modes may be supported on all chipsets. We are | ||
working on it. | ||
|
||
Bug reports | ||
--------- | ||
|
||
Thermal management on Nouveau is new and may not work on all cards. If you have | ||
inquiries, please ping mupuf on IRC (#nouveau, freenode). | ||
|
||
Bug reports should be filled on Freedesktop's bug tracker. Please follow | ||
http://nouveau.freedesktop.org/wiki/Bugs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* | ||
* Copyright 2013 Red Hat Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
#include <core/os.h> | ||
#include <core/event.h> | ||
|
||
static void | ||
nouveau_event_put_locked(struct nouveau_event *event, int index, | ||
struct nouveau_eventh *handler) | ||
{ | ||
if (!--event->index[index].refs) | ||
event->disable(event, index); | ||
list_del(&handler->head); | ||
} | ||
|
||
void | ||
nouveau_event_put(struct nouveau_event *event, int index, | ||
struct nouveau_eventh *handler) | ||
{ | ||
unsigned long flags; | ||
|
||
spin_lock_irqsave(&event->lock, flags); | ||
if (index < event->index_nr) | ||
nouveau_event_put_locked(event, index, handler); | ||
spin_unlock_irqrestore(&event->lock, flags); | ||
} | ||
|
||
void | ||
nouveau_event_get(struct nouveau_event *event, int index, | ||
struct nouveau_eventh *handler) | ||
{ | ||
unsigned long flags; | ||
|
||
spin_lock_irqsave(&event->lock, flags); | ||
if (index < event->index_nr) { | ||
list_add(&handler->head, &event->index[index].list); | ||
if (!event->index[index].refs++) | ||
event->enable(event, index); | ||
} | ||
spin_unlock_irqrestore(&event->lock, flags); | ||
} | ||
|
||
void | ||
nouveau_event_trigger(struct nouveau_event *event, int index) | ||
{ | ||
struct nouveau_eventh *handler, *temp; | ||
unsigned long flags; | ||
|
||
if (index >= event->index_nr) | ||
return; | ||
|
||
spin_lock_irqsave(&event->lock, flags); | ||
list_for_each_entry_safe(handler, temp, &event->index[index].list, head) { | ||
if (handler->func(handler, index) == NVKM_EVENT_DROP) { | ||
nouveau_event_put_locked(event, index, handler); | ||
} | ||
} | ||
spin_unlock_irqrestore(&event->lock, flags); | ||
} | ||
|
||
void | ||
nouveau_event_destroy(struct nouveau_event **pevent) | ||
{ | ||
struct nouveau_event *event = *pevent; | ||
if (event) { | ||
kfree(event); | ||
*pevent = NULL; | ||
} | ||
} | ||
|
||
int | ||
nouveau_event_create(int index_nr, struct nouveau_event **pevent) | ||
{ | ||
struct nouveau_event *event; | ||
int i; | ||
|
||
event = *pevent = kzalloc(sizeof(*event) + index_nr * | ||
sizeof(event->index[0]), GFP_KERNEL); | ||
if (!event) | ||
return -ENOMEM; | ||
|
||
spin_lock_init(&event->lock); | ||
for (i = 0; i < index_nr; i++) | ||
INIT_LIST_HEAD(&event->index[i].list); | ||
event->index_nr = index_nr; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.