[Intel-xe] [PATCH 22/41] fixup! drm/i915/display: Remaining changes to make xe compile
Jani Nikula
jani.nikula at intel.com
Wed Apr 12 14:19:47 UTC 2023
Now that we have colorkey type, we can drop the ifdefs.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 2 --
.../drm/i915/display/intel_display_types.h | 2 --
drivers/gpu/drm/i915/display/skl_scaler.c | 2 --
.../drm/i915/display/skl_universal_plane.c | 30 ++++---------------
4 files changed, 5 insertions(+), 31 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 92042e7fcfb4..eaa67be2ac75 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7785,7 +7785,6 @@ static void intel_plane_possible_crtcs_init(struct drm_i915_private *dev_priv)
}
}
-#ifdef I915
int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
struct drm_file *file)
{
@@ -7802,7 +7801,6 @@ int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
return 0;
}
-#endif
static u32 intel_encoder_possible_clones(struct intel_encoder *encoder)
{
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index fc798734f8d6..bc385aed39a0 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -755,9 +755,7 @@ struct intel_plane_state {
* this plane. They're calculated by the linked plane's wm code.
*/
u32 planar_slave;
-#ifdef I915
struct drm_intel_sprite_colorkey ckey;
-#endif
struct drm_rect psr2_sel_fetch_area;
/* Clear Color Value */
diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
index 2936cfb66d1d..473d53610b92 100644
--- a/drivers/gpu/drm/i915/display/skl_scaler.c
+++ b/drivers/gpu/drm/i915/display/skl_scaler.c
@@ -277,7 +277,6 @@ int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,
if (ret || plane_state->scaler_id < 0)
return ret;
-#ifdef I915
/* check colorkey */
if (plane_state->ckey.flags) {
drm_dbg_kms(&dev_priv->drm,
@@ -286,7 +285,6 @@ int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,
intel_plane->base.name);
return -EINVAL;
}
-#endif
/* Check src format */
switch (fb->format->format) {
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index d3eb56c0efd3..0f1e4e61d32e 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -898,9 +898,7 @@ static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
to_i915(plane_state->uapi.plane->dev);
const struct drm_framebuffer *fb = plane_state->hw.fb;
unsigned int rotation = plane_state->hw.rotation;
-#ifdef I915
const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
-#endif
u32 plane_ctl;
plane_ctl = PLANE_CTL_ENABLE;
@@ -924,12 +922,10 @@ static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
plane_ctl |= icl_plane_ctl_flip(rotation &
DRM_MODE_REFLECT_MASK);
-#ifdef I915
if (key->flags & I915_SET_COLORKEY_DESTINATION)
plane_ctl |= PLANE_CTL_KEY_ENABLE_DESTINATION;
else if (key->flags & I915_SET_COLORKEY_SOURCE)
plane_ctl |= PLANE_CTL_KEY_ENABLE_SOURCE;
-#endif
/* Wa_22012358565:adl-p */
if (DISPLAY_VER(dev_priv) == 13)
@@ -1055,35 +1051,26 @@ static u32 skl_plane_aux_dist(const struct intel_plane_state *plane_state,
static u32 skl_plane_keyval(const struct intel_plane_state *plane_state)
{
-#ifdef I915
const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
return key->min_value;
-#else
- return 0;
-#endif
}
static u32 skl_plane_keymax(const struct intel_plane_state *plane_state)
{
- u8 alpha = plane_state->hw.alpha >> 8;
-#ifdef I915
const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
+ u8 alpha = plane_state->hw.alpha >> 8;
return (key->max_value & 0xffffff) | PLANE_KEYMAX_ALPHA(alpha);
-#else
- return PLANE_KEYMAX_ALPHA(alpha);
-#endif
}
static u32 skl_plane_keymsk(const struct intel_plane_state *plane_state)
{
- u8 alpha = plane_state->hw.alpha >> 8;
- u32 keymsk = 0;
-#ifdef I915
const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
+ u8 alpha = plane_state->hw.alpha >> 8;
+ u32 keymsk;
+
keymsk = key->channel_mask & 0x7ffffff;
-#endif
if (alpha < 0xff)
keymsk |= PLANE_KEYMSK_ALPHA_ENABLE;
@@ -1424,7 +1411,6 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
return -EINVAL;
}
-#ifdef I915
/* Wa_1606054188:tgl,adl-s */
if ((IS_ALDERLAKE_S(dev_priv) || IS_TIGERLAKE(dev_priv)) &&
plane_state->ckey.flags & I915_SET_COLORKEY_SOURCE &&
@@ -1433,7 +1419,6 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
"Source color keying not supported with P01x formats\n");
return -EINVAL;
}
-#endif
return 0;
}
@@ -1901,12 +1886,7 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
return ret;
/* use scaler when colorkey is not required */
-#ifdef I915
- if (!plane_state->ckey.flags && skl_fb_scalable(fb))
-#else
- if (skl_fb_scalable(fb))
-#endif
- {
+ if (!plane_state->ckey.flags && skl_fb_scalable(fb)) {
min_scale = 1;
max_scale = skl_plane_max_scale(dev_priv, fb);
}
--
2.39.2
More information about the Intel-xe
mailing list