[PATCH 33/39] drm: rip out drm_core_has_MTRR checks

David Herrmann dh.herrmann at gmail.com
Wed Jul 10 08:41:34 PDT 2013


Hi

On Wed, Jul 10, 2013 at 5:22 PM, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> On Wed, Jul 10, 2013 at 3:51 PM, David Herrmann <dh.herrmann at 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 at 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 at 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.

Cheers
David

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list