drm/i915: Define bitmasks for skl+ scaler window pos/size
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Apr 2023 13:50:17 +0000 (16:50 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 4 May 2023 13:01:44 +0000 (16:01 +0300)
commit6ec91794ce4aad0e92a16028885a7b139fe363ae
tree234347f6f0c2983852d7c2a08969bc116e385c2d
parent576032f2b3db7ed5994a165ca0e4b6808c637f0f
drm/i915: Define bitmasks for skl+ scaler window pos/size

Define and use the bitmasks for the x/y components
of the skl+ scaler window pos/size registers.

We stick to the full 16 bits mask here even though the
hardware limits are actually lower. The current (ADL)
hardware maximums are in fact: 14 bits for X size, 13 bits
for X pos, 13 bits for Y size/pos. Yes, that is correct,
X pos has less bits than the X size for some reason. But
that  doesn't actually matter for now as we don't currently
even support such wide displays without the use of bigjoiner
(due to max plane width limit).

v2: Switch back to full 16bit masks since that's what
    we use transcoder timign regs and PIPESRC as well

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230426135019.7603-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/skl_scaler.c
drivers/gpu/drm/i915/i915_reg.h