[PATCH 1/3] drm/radeon/kms: use crtc-specific dpms functions in prepare and commit
Ilija Hadzic
ihadzic at research.bell-labs.com
Wed Oct 26 10:02:48 PDT 2011
On Wed, 26 Oct 2011, Michel [ISO-8859-1] Dänzer wrote:
> On Die, 2011-10-25 at 22:40 -0400, Ilija Hadzic wrote:
>> it's better that radeon_crtc_commit and radeon_crtc_prepare call
>> crtc-specific dpms functions instead of hard-coding them to
>> radeon_crtc_dpms.
>
> Is it really better? If it's always radeon_crtc_dpms anyway, this
> obfuscates that fact (and introduces a guaranteed branch prediction
> miss, but that probably doesn't matter here).
>
My reasoning for believing that it's better was that the functions are
fairly generic: they loops through all CRTCs and disable/enable them all.
Although at this time these functions are only used as helpers for legacy
crtcs (so indeed the pointer always resolves to radeon_crtc_dpms), if they
are ever called through some other path (in the context of atombios CRTC),
it doesn't hurt to make them ready for that.
Having said that, I don't really mind whatever the destiny of this patch
ends up being.
(and yes, branch prediction slot penalty really don't matter here; it's a
slow path anyway)
-- Ilija
More information about the dri-devel
mailing list