linux-sg2042/drivers/gpu/drm/radeon
Daniel Vetter 281856477c drm: rip out drm_core_has_MTRR checks
The new arch_phys_wc_add/del functions do the right thing both with
and without MTRR support in the kernel. So we can drop these
additional checks.

David Herrmann suggest to also kill the DRIVER_USE_MTRR flag since
it's now unused, which spurred me to do a bit a better audit of the
affected drivers. David helped a lot in that. Quoting our mail
discussion:

On Wed, Jul 10, 2013 at 5:41 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
> On Wed, Jul 10, 2013 at 5:22 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> On Wed, Jul 10, 2013 at 3:51 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
>>>> -#if __OS_HAS_MTRR
>>>> -static inline int drm_core_has_MTRR(struct drm_device *dev)
>>>> -{
>>>> -       return drm_core_check_feature(dev, DRIVER_USE_MTRR);
>>>> -}
>>>> -#else
>>>> -#define drm_core_has_MTRR(dev) (0)
>>>> -#endif
>>>> -
>>>
>>> That was the last user of DRIVER_USE_MTRR (apart from drivers setting
>>> it in .driver_features). Any reason to keep it around?
>>
>> Yeah, I guess we could rip things out. Which will also force me to
>> properly audit drivers for the eventual behaviour change this could
>> entail (in case there's an x86 driver which did not ask for an mtrr,
>> but iirc there isn't).
>
> david@david-mb ~/dev/kernel/linux $ for i in drivers/gpu/drm/* ; do if
> test -d "$i" ; then if ! grep -q USE_MTRR -r $i ; then echo $i ; fi ;
> fi ; done
> drivers/gpu/drm/exynos
> drivers/gpu/drm/gma500
> drivers/gpu/drm/i2c
> drivers/gpu/drm/nouveau
> drivers/gpu/drm/omapdrm
> drivers/gpu/drm/qxl
> drivers/gpu/drm/rcar-du
> drivers/gpu/drm/shmobile
> drivers/gpu/drm/tilcdc
> drivers/gpu/drm/ttm
> drivers/gpu/drm/udl
> drivers/gpu/drm/vmwgfx
> david@david-mb ~/dev/kernel/linux $
>
> So for x86 gma500,nouveau,qxl,udl,vmwgfx don't set DRIVER_USE_MTRR.
> But I cannot tell whether they break if we call arch_phys_wc_add/del,
> anyway. At least nouveau seemed to work here, but it doesn't use AGP
> or drm_bufs, I guess.

Cool, thanks a lot for stitching together the list of drivers to look
at. So for real KMS drivers it's the drives responsibility to add an
mtrr if it needs one. nouvea, radeon, mgag200, i915 and vmwgfx do that
already. Somehow the savage driver also ends up doing that, I have no
idea why.

Note that gma500 as a pure KMS driver doesn't need MTRR setup since
the platforms that it supports all support PAT. So no MTRRs needed to
get wc iomappings.

The mtrr support in the drm core is all for legacy mappings of garts,
framebuffers and registers. All legacy drivers set the USE_MTRR flag,
so we're good there.

All in all I think we can really just ditch this

/endquote

v2: Also kill DRIVER_USE_MTRR as suggested by David Herrmann

v3: Rebase on top of David Herrmann's agp setup/cleanup changes.

Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-08-19 14:11:44 +10:00
..
reg_srcs drm/radeon: add WAIT_UNTIL to the non-VM safe regs list for cayman/TN 2013-01-27 22:38:44 -05:00
.gitignore
Kconfig drm/radeon: Deprecate UMS support v2 2013-01-31 16:24:47 -05:00
Makefile drm/radeon/kms: add dpm support for SI (v7) 2013-06-27 19:40:05 -04:00
ObjectID.h drm/radeon: upstream ObjectID.h updates (v2) 2013-06-26 16:11:34 -04:00
atom-bits.h
atom-names.h
atom-types.h
atom.c drm/radeon: fix endian bugs in atom_allocate_fb_scratch() 2013-05-02 10:01:45 -04:00
atom.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
atombios.h drm/radeon/kms: add dpm support for SI (v7) 2013-06-27 19:40:05 -04:00
atombios_crtc.c drm/radeon/dpm: add helper to calculate vblank time 2013-07-08 17:40:09 -04:00
atombios_dp.c Merge remote-tracking branch 'pfdo/drm-rcar-for-v3.12' into drm-next 2013-08-19 09:24:13 +10:00
atombios_encoders.c drm/radeon/atom: add support for new DVO tables 2013-06-26 16:11:41 -04:00
atombios_i2c.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
avivod.h
btc_dpm.c drm/radeon/dpm: implement vblank_too_short callback for btc 2013-07-08 17:40:52 -04:00
btc_dpm.h drm/radeon/dpm/btc: restructure code 2013-06-27 19:16:14 -04:00
btcd.h drm/radeon/kms: add dpm support for btc (v3) 2013-06-27 19:15:44 -04:00
cayman_blit_shaders.c bug.h: add include of it to various implicit C users 2012-02-29 17:15:08 -05:00
cayman_blit_shaders.h drm/radeon/kms: add blit support for cayman (v2) 2011-05-26 09:19:31 +10:00
cik.c drm/radeon: s/drm_order/order_base_2/ 2013-07-23 20:14:24 +10:00
cik_blit_shaders.c drm/radeon: Add CP init for CIK (v7) 2013-06-25 17:50:28 -04:00
cik_blit_shaders.h drm/radeon: Add CP init for CIK (v7) 2013-06-25 17:50:28 -04:00
cik_reg.h drm/radeon/dce8: crtc_set_base updates 2013-06-26 16:11:39 -04:00
cikd.h drm/radeon: add fault decode function for CIK 2013-07-14 10:11:29 -04:00
clearstate_cayman.h drm/radeon: properly set up the RLC on ON/LN/TN (v3) 2013-06-27 10:49:18 -04:00
clearstate_defs.h drm/radeon: properly set up the RLC on ON/LN/TN (v3) 2013-06-27 10:49:18 -04:00
clearstate_evergreen.h drm/radeon: properly set up the RLC on ON/LN/TN (v3) 2013-06-27 10:49:18 -04:00
clearstate_si.h drm/radeon: add clearstate init for verde power gating 2013-06-27 19:16:31 -04:00
cypress_dpm.c drm/radeon/dpm: implement vblank_too_short callback for evergreen 2013-07-08 17:40:42 -04:00
cypress_dpm.h drm/radeon/dpm: add pre/post_set_power_state callback (BTC) 2013-06-27 19:16:19 -04:00
evergreen.c drm/radeon: s/drm_order/order_base_2/ 2013-07-23 20:14:24 +10:00
evergreen_blit_kms.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
evergreen_blit_shaders.c bug.h: add include of it to various implicit C users 2012-02-29 17:15:08 -05:00
evergreen_blit_shaders.h
evergreen_cs.c drm/radeon: don't check mipmap alignment if MIP_ADDRESS is FMASK 2013-03-07 12:58:59 -05:00
evergreen_hdmi.c drm/radeon/hdmi: make sure we have an afmt block assigned 2013-07-14 10:10:53 -04:00
evergreen_reg.h drm/radeon: add accessors of pif_phy indirect register space 2013-06-27 19:16:26 -04:00
evergreen_smc.h drm/radeon/kms: add dpm support for evergreen (v4) 2013-06-27 19:15:22 -04:00
evergreend.h drm/radeon: enable additional power gating features on trinity 2013-06-27 19:16:28 -04:00
mkregtable.c radeon: remove redundant __list_for_each definition from mkregtable.c 2013-07-03 16:07:43 -07:00
ni.c drm/radeon: s/drm_order/order_base_2/ 2013-07-23 20:14:24 +10:00
ni_dpm.c drm/radeon/dpm: implement vblank_too_short callback for cayman 2013-07-08 17:41:01 -04:00
ni_dpm.h drm/radeon/dpm: implement vblank_too_short callback for si 2013-07-08 17:41:11 -04:00
ni_reg.h
nid.h drm/radeon: add fault decode function for cayman/TN (v2) 2013-07-14 10:11:28 -04:00
nislands_smc.h drm/radeon/kms: add dpm support for cayman (v5) 2013-06-27 19:16:10 -04:00
ppsmc.h drm/radeon/dpm: implement force performance level for TN 2013-07-05 18:10:06 -04:00
r100.c drm/radeon: s/drm_order/order_base_2/ 2013-07-23 20:14:24 +10:00
r100_track.h drm/radeon: use common next_reloc function 2013-01-31 16:24:45 -05:00
r100d.h drm/radeon: consolidate redundant macros and constants 2013-01-31 16:24:46 -05:00
r200.c drm/radeon: use common next_reloc function 2013-01-31 16:24:45 -05:00
r300.c radeon: Fix system hang issue when using KMS with older cards 2013-06-03 10:17:54 -04:00
r300_cmdbuf.c drm/radeon: check incoming cliprects pointer 2013-05-13 15:23:34 +10:00
r300_reg.h
r300d.h drm/radeon: consolidate redundant macros and constants 2013-01-31 16:24:46 -05:00
r420.c radeon: Fix system hang issue when using KMS with older cards 2013-06-03 10:17:54 -04:00
r420d.h
r500_reg.h drm/radeon: disable the crtcs in mc_stop (r5xx-r7xx) (v2) 2013-04-22 10:39:09 -04:00
r520.c radeon: Fix system hang issue when using KMS with older cards 2013-06-03 10:17:54 -04:00
r520d.h
r600.c Merge remote-tracking branch 'pfdo/drm-rcar-for-v3.12' into drm-next 2013-08-19 09:24:13 +10:00
r600_audio.c drm/radeon: clean up audio dto programming 2013-04-23 18:03:53 -04:00
r600_blit.c drm/radeon: Deprecate UMS support v2 2013-01-31 16:24:47 -05:00
r600_blit_kms.c drm/radeon: Deprecate UMS support v2 2013-01-31 16:24:47 -05:00
r600_blit_shaders.c The following text was taken from the original review request: 2012-03-24 10:08:39 -07:00
r600_blit_shaders.h Annotate int2float() as being a pure function. 2012-09-20 13:10:34 -04:00
r600_cp.c drm/radeon: s/drm_order/order_base_2/ 2013-07-23 20:14:24 +10:00
r600_cs.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2013-02-25 16:46:44 -08:00
r600_dpm.c drm/radeon/dpm: fix r600_enable_sclk_control() 2013-07-25 21:46:21 -04:00
r600_dpm.h drm/radeon/dpm: add helper to calculate vblank time 2013-07-08 17:40:09 -04:00
r600_hdmi.c drm/radeon/hdmi: make sure we have an afmt block assigned 2013-07-14 10:10:53 -04:00
r600_reg.h drm/radeon: add indirect accessors for UVD CTX registers 2013-06-27 19:16:30 -04:00
r600d.h drm/radeon: implement bo copy callback using CP DMA (v2) 2013-07-14 10:11:26 -04:00
radeon.h drm/gem: create drm_gem_dumb_destroy 2013-08-07 09:59:24 +10:00
radeon_acpi.c drm/radeon: implement apci perf request 2013-06-27 19:16:23 -04:00
radeon_acpi.h drm/radeon: implement handler for ACPI event 2012-09-20 13:10:36 -04:00
radeon_agp.c radeon: add AGPMode 1 quirk for RV250 2012-11-20 11:47:32 -05:00
radeon_asic.c drm/radeon/dpm: implement force performance levels for rv6xx 2013-07-25 20:07:25 -04:00
radeon_asic.h drm/radeon/dpm: implement force performance levels for rv6xx 2013-07-25 20:07:25 -04:00
radeon_atombios.c drm/radeon/dpm/atom: fix broken gcc harder 2013-07-17 16:35:06 -04:00
radeon_atpx_handler.c drm/radeon: properly validate the atpx interface 2013-02-20 08:51:21 -05:00
radeon_benchmark.c drm/radeon/benchmark: allow same domains for dma copy 2013-03-15 18:47:18 -04:00
radeon_bios.c Merge branch 'drm-radeon-sun-hainan' of git://people.freedesktop.org/~airlied/linux 2013-05-21 08:50:57 -07:00
radeon_blit_common.h drm/radeon/kms: common definitions for blit copy code 2012-02-03 09:31:14 +00:00
radeon_clocks.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_combios.c drm/radeon: fix combios tables on older cards 2013-07-22 15:57:14 -04:00
radeon_connectors.c drm/radeon: Properly handle DDC probe for DP bridges 2013-01-03 15:04:38 -05:00
radeon_cp.c drm/radeon: s/drm_order/order_base_2/ 2013-07-23 20:14:24 +10:00
radeon_cs.c drm/ttm: make ttm reservation calls behave like reservation calls 2013-06-28 12:02:20 +10:00
radeon_cursor.c drm/radeon/cik: add hw cursor support (v2) 2013-06-26 16:11:38 -04:00
radeon_device.c drm/radeon: implement simple doorbell page allocator 2013-06-27 10:49:07 -04:00
radeon_display.c drm/radeon/atom: add DCE8 encoder support 2013-06-26 16:11:40 -04:00
radeon_drv.c drm: rip out drm_core_has_MTRR checks 2013-08-19 14:11:44 +10:00
radeon_drv.h drm/radeon: Deprecate UMS support v2 2013-01-31 16:24:47 -05:00
radeon_encoders.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
radeon_family.h drm/radeon: add CIK chip families 2013-06-25 17:50:22 -04:00
radeon_fb.c treewide: Fix typo in printk 2013-05-28 12:02:13 +02:00
radeon_fence.c drm/radeon: never unpin UVD bo v3 2013-07-14 10:11:30 -04:00
radeon_gart.c drm/radeon/vm: only align the pt base to 32k 2013-07-22 15:57:11 -04:00
radeon_gem.c drm/gem: create drm_gem_dumb_destroy 2013-08-07 09:59:24 +10:00
radeon_i2c.c drm/radeon: Properly handle DDC probe for DP bridges 2013-01-03 15:04:38 -05:00
radeon_ioc32.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
radeon_irq.c drm/radeon: Deprecate UMS support v2 2013-01-31 16:24:47 -05:00
radeon_irq_kms.c radeon kms: do not flush uninitialized hotplug work 2013-07-15 09:37:38 -04:00
radeon_kms.c drm/radeon: kill firstopen callback for kms driver 2013-08-19 10:03:15 +10:00
radeon_legacy_crtc.c drm/radeon: Remove superfluous variable 2013-05-20 10:44:57 -04:00
radeon_legacy_encoders.c radeon/kms: force rn50 chip to always report connected on analog output 2013-01-10 17:05:37 -05:00
radeon_legacy_tv.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_mem.c drm/radeon: Deprecate UMS support v2 2013-01-31 16:24:47 -05:00
radeon_mode.h drm/radeon/dpm: add helper to calculate vblank time 2013-07-08 17:40:09 -04:00
radeon_object.c drm/radeon: remove stale gem->driver_private access 2013-08-19 09:34:47 +10:00
radeon_object.h drm/ttm: convert to unified vma offset manager 2013-07-25 20:47:07 +10:00
radeon_pm.c drm/radeon/dpm: add checks against vblank time 2013-07-08 17:40:20 -04:00
radeon_prime.c drm/radeon: remove stale gem->driver_private access 2013-08-19 09:34:47 +10:00
radeon_reg.h drm/radeon/cik: add hw cursor support (v2) 2013-06-26 16:11:38 -04:00
radeon_ring.c drm/radeon: allow selection of alignment in the sub-allocator 2013-07-14 10:11:31 -04:00
radeon_sa.c drm/radeon: allow selection of alignment in the sub-allocator 2013-07-14 10:11:31 -04:00
radeon_semaphore.c drm/radeon: improve semaphore debugging on lockup 2013-01-15 09:07:13 -05:00
radeon_state.c drm/radeon: Deprecate UMS support v2 2013-01-31 16:24:47 -05:00
radeon_test.c drm/radeon: get rid of ttm_bo_is_reserved usage 2013-06-28 12:04:12 +10:00
radeon_trace.h
radeon_trace_points.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_ttm.c drm/radeon: Fix VRAM size calculation for VRAM >= 4GB 2013-05-20 10:44:57 -04:00
radeon_ucode.h drm/radeon/kms: add dpm support for SI (v7) 2013-06-27 19:40:05 -04:00
radeon_uvd.c drm/radeon: never unpin UVD bo v3 2013-07-14 10:11:30 -04:00
rs100d.h
rs400.c radeon: Fix system hang issue when using KMS with older cards 2013-06-03 10:17:54 -04:00
rs400d.h
rs600.c radeon: Fix system hang issue when using KMS with older cards 2013-06-03 10:17:54 -04:00
rs600d.h drm/radeon/kms: add register definitions for audio 2012-04-24 09:50:13 +01:00
rs690.c drm/radeon/kms: fix up rs780/rs880 display watermark calc for dpm 2013-06-27 10:49:21 -04:00
rs690d.h drm/radeon: Use direct mapping for fast fb access on RS690 2013-04-09 10:31:31 -04:00
rs780_dpm.c drm/radeon/dpm: add debugfs support for RS780/RS880 (v3) 2013-07-17 16:47:52 -04:00
rs780_dpm.h drm/radeon/kms: add dpm support for rs780/rs880 2013-06-27 10:49:25 -04:00
rs780d.h drm/radeon/dpm: add debugfs support for RS780/RS880 (v3) 2013-07-17 16:47:52 -04:00
rv6xx_dpm.c drm/radeon/dpm: implement force performance levels for rv6xx 2013-07-25 20:07:25 -04:00
rv6xx_dpm.h drm/radeon/kms: add dpm support for rv6xx (v3) 2013-06-27 10:50:08 -04:00
rv6xxd.h drm/radeon/kms: add dpm support for rv6xx (v3) 2013-06-27 10:50:08 -04:00
rv200d.h
rv250d.h
rv350d.h
rv515.c drm/radeon/kms: fix up 6xx/7xx display watermark calc for dpm 2013-06-27 10:49:22 -04:00
rv515d.h drm/radeon: consolidate redundant macros and constants 2013-01-31 16:24:46 -05:00
rv730_dpm.c drm/radeon/kms: add dpm support for rv7xx (v4) 2013-06-27 19:14:59 -04:00
rv730d.h drm/radeon/kms: add dpm support for rv7xx (v4) 2013-06-27 19:14:59 -04:00
rv740_dpm.c drm/radeon/dpm/rv7xx: restructure code 2013-06-27 19:16:12 -04:00
rv740d.h drm/radeon/kms: add dpm support for rv7xx (v4) 2013-06-27 19:14:59 -04:00
rv770.c drm/radeon: never unpin UVD bo v3 2013-07-14 10:11:30 -04:00
rv770_dpm.c drm/radeon: add a module parameter to disable aspm 2013-07-17 14:52:46 -04:00
rv770_dpm.h drm/radeon/dpm: implement force performance levels for 7xx/eg/btc 2013-07-05 18:09:30 -04:00
rv770_smc.c drm/radeon/kms: add dpm support for cayman (v5) 2013-06-27 19:16:10 -04:00
rv770_smc.h drm/radeon: add dpm UVD handling for evergreen/btc asics 2013-06-27 19:15:47 -04:00
rv770d.h drm/radeon/dpm: add debugfs support for 7xx/evergreen/btc 2013-07-01 16:08:32 -04:00
si.c drm/radeon: s/drm_order/order_base_2/ 2013-07-23 20:14:24 +10:00
si_blit_shaders.c The following text was taken from the original review request: 2012-03-24 10:08:39 -07:00
si_blit_shaders.h drm/radeon/kms: add support for CP setup on SI 2012-03-21 06:55:54 +00:00
si_dpm.c drm/radeon/dpm: implement vblank_too_short callback for si 2013-07-08 17:41:11 -04:00
si_dpm.h drm/radeon/kms: add dpm support for SI (v7) 2013-06-27 19:40:05 -04:00
si_reg.h drm/radeon: SI tiling fixes for display 2012-06-20 19:55:56 +01:00
si_smc.c drm/radeon/kms: add dpm support for SI (v7) 2013-06-27 19:40:05 -04:00
sid.h drm/radeon: add fault decode function for SI (v2) 2013-07-14 10:11:29 -04:00
sislands_smc.h drm/radeon/kms: add dpm support for SI (v7) 2013-06-27 19:40:05 -04:00
sumo_dpm.c drm/radeon/dpm/sumo: handle boost states properly when forcing a perf level 2013-07-15 09:37:25 -04:00
sumo_dpm.h drm/radeon/dpm: remove local sumo_get_xclk() 2013-06-27 19:16:22 -04:00
sumo_smc.c drm/radeon/dpm: remove local sumo_get_xclk() 2013-06-27 19:16:22 -04:00
sumod.h drm/radeon: add dpm UVD handling for sumo asics 2013-06-27 19:15:48 -04:00
trinity_dpm.c drm/radeon/dpm: implement force performance level for TN 2013-07-05 18:10:06 -04:00
trinity_dpm.h drm/radeon/dpm: implement force performance level for TN 2013-07-05 18:10:06 -04:00
trinity_smc.c drm/radeon/dpm: implement force performance level for TN 2013-07-05 18:10:06 -04:00
trinityd.h drm/radeon: add dpm UVD handling for TN asics (v2) 2013-06-27 19:15:48 -04:00