1
0
Fork 0
Commit Graph

2546 Commits (bca34c9a40e503e9bc6bafa45819dd55c2fd3e20)

Author SHA1 Message Date
Maarten Lankhorst 977c38d50e drm/radeon: get rid of ttm_bo_is_reserved usage
Try to use lockdep_assert_held or other alternatives where possible.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28 12:04:12 +10:00
Maarten Lankhorst c43f9b1699 drm/radeon: inline reservations
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28 12:04:07 +10:00
Maarten Lankhorst ecff665f5e drm/ttm: make ttm reservation calls behave like reservation calls
This commit converts the source of the val_seq counter to
the ww_mutex api. The reservation objects are converted later,
because there is still a lockdep splat in nouveau that has to
resolved first.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28 12:02:20 +10:00
Maarten Lankhorst 280cf21186 drm/radeon: implement unpin function, v2
Changes since v1:
- Fixup compiler warning in unpin function.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28 11:55:11 +10:00
Dave Airlie 5b0207bb59 Merge branch 'drm-next-3.11' of git://people.freedesktop.org/~agd5f/linux into drm-next
This is the pull request for radeon for 3.11.  Highlights include:

- Support for CIK (Sea Islands) asics: 3D, compute, UVD
- DPM (Dynamic Power Management) support for 6xx-SI
- ASPM support for 6xx-SI
- Assorted bug fixes

* 'drm-next-3.11' of git://people.freedesktop.org/~agd5f/linux: (168 commits)
  drm/radeon/SI: fix TDP adjustment in set_power_state
  drm/radeon/NI: fix TDP adjustment in set_power_state
  drm/radeon: fix endian issues in atombios dpm code
  drm/radeon/dpm: fix UVD clock setting on SI
  drm/radeon/dpm: fix UVD clock setting on cayman
  drm/radeon/dpm: add support for setting UVD clock on rv6xx
  drm/radeon/dpm: add support for setting UVD clock on rs780
  drm/radeon: fix typo in ni_print_power_state
  drm/radeon: fix typo in cik_select_se_sh()
  drm/radeon/si: fix typo in function name
  drm/radeon/dpm: fix typo in setting uvd clock
  drm/radeon/dpm: add dpm_set_power_state failure output (si)
  add dpm_set_power_state failure output (7xx-ni)
  drm/radeon/dpm: add dpm_set_power_state failure output (7xx-ni)
  drm/radeon/dpm: add dpm_enable failure output (si)
  drm/radeon/dpm: add dpm_enable failure output (7xx-ni)
  drm/radeon/kms: add dpm support for SI (v7)
  drm/radeon: switch SI to use radeon_ucode.h
  drm/radeon: add SI to r600_is_internal_thermal_sensor()
  drm/radeon/dpm/rs780: properly catch errors in dpm setup
  ...
2013-06-28 10:53:23 +10:00
Alex Deucher a144acbcfb drm/radeon/SI: fix TDP adjustment in set_power_state
Fixes hangs with DPM in some cases.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:16 -04:00
Alex Deucher 728cf6bb4d drm/radeon/NI: fix TDP adjustment in set_power_state
Fixes hangs with DPM in some cases.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:15 -04:00
Alex Deucher 6e764764d5 drm/radeon: fix endian issues in atombios dpm code
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:15 -04:00
Alex Deucher e34568b892 drm/radeon/dpm: fix UVD clock setting on SI
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:14 -04:00
Alex Deucher d434e81e59 drm/radeon/dpm: fix UVD clock setting on cayman
The rv770 version was using the wrong power state type.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:13 -04:00
Alex Deucher 02478a102b drm/radeon/dpm: add support for setting UVD clock on rv6xx
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:12 -04:00
Alex Deucher 915203c187 drm/radeon/dpm: add support for setting UVD clock on rs780
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:12 -04:00
Alex Deucher 71de795c6c drm/radeon: fix typo in ni_print_power_state
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:11 -04:00
Alex Deucher b0fe3d39f6 drm/radeon: fix typo in cik_select_se_sh()
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:10 -04:00
Alex Deucher ba19031a80 drm/radeon/si: fix typo in function name
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:10 -04:00
Alex Deucher e38bb5aeef drm/radeon/dpm: fix typo in setting uvd clock
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:09 -04:00
Alex Deucher cc833b6088 drm/radeon/dpm: add dpm_set_power_state failure output (si)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:08 -04:00
Alex Deucher 173dbb0ef6 add dpm_set_power_state failure output (7xx-ni)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:08 -04:00
Alex Deucher 72dd2c54ee drm/radeon/dpm: add dpm_set_power_state failure output (7xx-ni)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:07 -04:00
Alex Deucher 2c48febb47 drm/radeon/dpm: add dpm_enable failure output (si)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:06 -04:00
Alex Deucher fa4b5471bd drm/radeon/dpm: add dpm_enable failure output (7xx-ni)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:05 -04:00
Alex Deucher a9e6141092 drm/radeon/kms: add dpm support for SI (v7)
This adds dpm support for SI asics.  This includes:
- dynamic engine clock scaling
- dynamic memory clock scaling
- dynamic voltage scaling
- dynamic pcie gen1/gen2/gen3 switching
- power containment
- shader power scaling

Set radeon.dpm=1 to enable.

v2: enable hainan support, rebase
v3: guard acpi stuff
v4: fix 64 bit math
v5: fix 64 bit div harder
v6: fix thermal interrupt check noticed by Jerome
v7: attempt fix state enable

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:05 -04:00
Alex Deucher a0ceada6b4 drm/radeon: switch SI to use radeon_ucode.h
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:53 -04:00
Alex Deucher ac1633876f drm/radeon: add SI to r600_is_internal_thermal_sensor()
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:52 -04:00
Alex Deucher a172230f19 drm/radeon/dpm/rs780: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:52 -04:00
Alex Deucher ac0cdcb514 drm/radeon/dpm/r6xx: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:51 -04:00
Alex Deucher b97721f311 drm/radeon/dpm/r7xx: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:50 -04:00
Alex Deucher c3efac0d5b drm/radeon/dpm/trinity: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:49 -04:00
Alex Deucher 2c47b063a0 drm/radeon/dpm/sumo: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:48 -04:00
Alex Deucher 1f67df4df7 drm/radeon/dpm/evergreen: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:47 -04:00
Alex Deucher aafb3afa59 drm/radeon/dpm/btc: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:46 -04:00
Alex Deucher 79fb809a5d drm/radeon/dpm/ni: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:44 -04:00
Alex Deucher 779187f2c3 drm/radeon/atom: fix voltage table parsing
The arrays items are variable sized.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:42 -04:00
Alex Deucher da289525b6 drm/radeon: fix typo in atom voltage table handling (si+)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:42 -04:00
Alex Deucher 7a80c2c9a9 drm/radeon: fix typo in atom voltage table handling (6xx-ni)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:41 -04:00
Alex Deucher 4bd9f516f6 drm/radeon/dpm: add pcie gen helper function
Add a helper function to determine the preferred
pcie gen based on the card, system, and circumstance.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:40 -04:00
Alex Deucher 2abba66e7a drm/radeon: update radeon_atombios_get_default_voltages for mvdd
Add a way to look up the bootup mvdd.  Required for DPM on SI.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:40 -04:00
Alex Deucher 4489cd62e5 drm/radeon/dpm: validate voltages against dispclk requirements
Validate the voltages against the voltage requirements of the
dispclk.  We currently don't adjust the disp clock so it never
changes, but we need to filter out voltage levels that are too
low none the less.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:39 -04:00
Alex Deucher f907eec036 drm/radeon: fix some memory leaks in extended table parsing
Forgot to free some structs when allocation fails for some
tables.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:38 -04:00
Alex Deucher b253e4b359 drm/radeon/dpm/cayman: use new fixed point functions (v2)
Use the new fixed point functions for leakage
calculations on cayman.

v2: fix up 64 bit math

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:38 -04:00
Alex Deucher 9ed36f7505 drm/radeon: minor sid.h cleanup
Consolidate the non-register defines.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:36 -04:00
Alex Deucher 7178d2a642 drm/radeon/dpm: save some display parameters for DPM
Required for SI.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:36 -04:00
Alex Deucher a5cb318e3f drm/radeon/dpm: pull in ppm info from atom
Used by SI dpm.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:35 -04:00
Alex Deucher 9985318b7f drm/radeon/dpm: endian fixes for extended power tables
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:34 -04:00
Alex Deucher 929ee7a8b3 drm/radeon/dpm: pull in phase shedding limits from atom
Required for dpm on SI.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:34 -04:00
Alex Deucher 32ce4652dc drm/radeon/dpm: add an enum for pcie gen selection
This makes it easier the understand what the code is
doing.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:33 -04:00
Alex Deucher f8f84ac5d4 drm/radeon: implement clock and power gating for SI
Only Cape Verde supports power gating.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:32 -04:00
Alex Deucher bd8cd5391a drm/radeon: add clearstate init for verde power gating
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:31 -04:00
Alex Deucher 6d8cf0005d drm/radeon: initialize save/restore buffer for pg on verde
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:31 -04:00
Alex Deucher 93656cdd3c drm/radeon: add indirect accessors for UVD CTX registers
These are needed for certain UVD power saving features.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:30 -04:00