mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 22:12:32 -04:00
drm/i915: Use REG_BIT() & co for the pre-ilk pfit registers
Modernize the gmch pfit register definitions using REG_BIT/etc. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230418175528.13117-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -2749,6 +2749,7 @@ static void i9xx_get_pfit_config(struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||
enum pipe pipe;
|
||||
u32 tmp;
|
||||
|
||||
if (!i9xx_has_pfit(dev_priv))
|
||||
@@ -2759,13 +2760,13 @@ static void i9xx_get_pfit_config(struct intel_crtc_state *crtc_state)
|
||||
return;
|
||||
|
||||
/* Check whether the pfit is attached to our pipe. */
|
||||
if (DISPLAY_VER(dev_priv) < 4) {
|
||||
if (crtc->pipe != PIPE_B)
|
||||
return;
|
||||
} else {
|
||||
if ((tmp & PFIT_PIPE_MASK) != (crtc->pipe << PFIT_PIPE_SHIFT))
|
||||
return;
|
||||
}
|
||||
if (DISPLAY_VER(dev_priv) >= 4)
|
||||
pipe = REG_FIELD_GET(PFIT_PIPE_MASK, tmp);
|
||||
else
|
||||
pipe = PIPE_B;
|
||||
|
||||
if (pipe != crtc->pipe)
|
||||
return;
|
||||
|
||||
crtc_state->gmch_pfit.control = tmp;
|
||||
crtc_state->gmch_pfit.pgm_ratios =
|
||||
|
||||
Reference in New Issue
Block a user