Skip to contentSkip to conversation

drm/i915: skl_update_scaler() wants a rotation bitmask instead of bit number

PATCH In review [email protected] 3 participants 7 messages Oct 15, 2015 – Jan 19, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: skl_update_scaler() wants a rotation bitmask instead of bit number

From: Ville Syrjälä <[email protected]>

Pass BIT(DRM_ROTATE_0) instead of DRM_ROTATE_0 to skl_update_scaler(). The former is a mask, the latter just the bit number.

Fortunately the only thing skl_update_scaler() does with the rotation is check if it's 90/270 degrees or not, and so in this case it would still do the right thing.

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 7498c9d..02316d0 100644
@@ -4673,7 +4673,7 @@ int skl_update_scaler_crtc(struct intel_crtc_state *state)
 		      intel_crtc->base.base.id, intel_crtc->pipe, SKL_CRTC_INDEX);
 
 	return skl_update_scaler(state, !state->base.active, SKL_CRTC_INDEX,
-		&state->scaler_state.scaler_id, DRM_ROTATE_0,
+		&state->scaler_state.scaler_id, BIT(DRM_ROTATE_0),
 		state->pipe_src_w, state->pipe_src_h,
 		adjusted_mode->crtc_hdisplay, adjusted_mode->crtc_vdisplay);
 }
Signature · 6 lines
2.4.9

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 11 lines · On Thu, Oct 15, 2015 at 05:01:58PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Pass BIT(DRM_ROTATE_0) instead of DRM_ROTATE_0 to skl_update_scaler(). The former is a mask, the latter just the bit number.

Fortunately the only thing skl_update_scaler() does with the rotation is check if it's 90/270 degrees or not, and so in this case it would still do the right thing.

Ping, anyone care to r-b this one?

Quoted 19 lines
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 7498c9d..02316d0 100644
@@ -4673,7 +4673,7 @@ int skl_update_scaler_crtc(struct intel_crtc_state *state)
 		      intel_crtc->base.base.id, intel_crtc->pipe, SKL_CRTC_INDEX);
 
 	return skl_update_scaler(state, !state->base.active, SKL_CRTC_INDEX,
-		&state->scaler_state.scaler_id, DRM_ROTATE_0,
+		&state->scaler_state.scaler_id, BIT(DRM_ROTATE_0),
 		state->pipe_src_w, state->pipe_src_h,
 		adjusted_mode->crtc_hdisplay, adjusted_mode->crtc_vdisplay);
 }
Signature · 1 line
2.4.9
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by
#2 lore raw
Quoted 6 lines · Ville Syrjälä
Quoted 5 lines · On Thu, Oct 15, 2015 at 05:01:58PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Pass BIT(DRM_ROTATE_0) instead of DRM_ROTATE_0 to skl_update_scaler(). The former is a mask, the latter just the bit number.

Quoted 8 lines
Quoted 6 lines

Fortunately the only thing skl_update_scaler() does with the rotation is check if it's 90/270 degrees or not, and so in this case it would still do the right thing.

Ping, anyone care to r-b this one?

Looks like this bug has been present since scalers were first added in 6156a45602f9 ("drm/i915: skylake primary plane scaling using shared scalers")

Matt

Quoted 28 lines
Quoted 20 lines
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 7498c9d..02316d0 100644
@@ -4673,7 +4673,7 @@ int skl_update_scaler_crtc(struct intel_crtc_state *state)
 		      intel_crtc->base.base.id, intel_crtc->pipe, SKL_CRTC_INDEX);
 
 	return skl_update_scaler(state, !state->base.active, SKL_CRTC_INDEX,
-		&state->scaler_state.scaler_id, DRM_ROTATE_0,
+		&state->scaler_state.scaler_id, BIT(DRM_ROTATE_0),
 		state->pipe_src_w, state->pipe_src_h,
 		adjusted_mode->crtc_hdisplay, adjusted_mode->crtc_vdisplay);
 }
Signature · 1 line
2.4.9
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 9 lines
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author Applied
#3 lore raw
Quoted 14 lines · Matt Roper
Quoted 13 lines · Ville Syrjälä
Quoted 11 lines · On Thu, Oct 15, 2015 at 05:01:58PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Pass BIT(DRM_ROTATE_0) instead of DRM_ROTATE_0 to skl_update_scaler(). The former is a mask, the latter just the bit number.

Fortunately the only thing skl_update_scaler() does with the rotation is check if it's 90/270 degrees or not, and so in this case it would still do the right thing.

Quoted 6 lines
Quoted 1 line

Ping, anyone care to r-b this one?

Looks like this bug has been present since scalers were first added in 6156a45602f9 ("drm/i915: skylake primary plane scaling using shared scalers")

Pushed to dinq an appropriate Fixes: comment added. Thanks for the review.

Quoted 39 lines

Matt

Quoted 28 lines
Quoted 20 lines
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 7498c9d..02316d0 100644
@@ -4673,7 +4673,7 @@ int skl_update_scaler_crtc(struct intel_crtc_state *state)
 		      intel_crtc->base.base.id, intel_crtc->pipe, SKL_CRTC_INDEX);
 
 	return skl_update_scaler(state, !state->base.active, SKL_CRTC_INDEX,
-		&state->scaler_state.scaler_id, DRM_ROTATE_0,
+		&state->scaler_state.scaler_id, BIT(DRM_ROTATE_0),
 		state->pipe_src_w, state->pipe_src_h,
 		adjusted_mode->crtc_hdisplay, adjusted_mode->crtc_vdisplay);
 }
Signature · 1 line
2.4.9
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 15 lines · Ville Syrjälä
Quoted 14 lines · Matt Roper
Quoted 13 lines · Ville Syrjälä
Quoted 11 lines · On Thu, Oct 15, 2015 at 05:01:58PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Pass BIT(DRM_ROTATE_0) instead of DRM_ROTATE_0 to skl_update_scaler(). The former is a mask, the latter just the bit number.

Fortunately the only thing skl_update_scaler() does with the rotation is check if it's 90/270 degrees or not, and so in this case it would still do the right thing.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Ping, anyone care to r-b this one?

Looks like this bug has been present since scalers were first added in 6156a45602f9 ("drm/i915: skylake primary plane scaling using shared scalers")

Pushed to dinq an appropriate Fixes: comment added. Thanks for the review.

Do we have an igt for this? If not need to capture it and make it something we must fixe before more scaler stuff lands. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
Quoted 20 lines · Daniel Vetter
Quoted 19 lines · Ville Syrjälä
Quoted 18 lines · Matt Roper
Quoted 6 lines · Ville Syrjälä
Quoted 5 lines · On Thu, Oct 15, 2015 at 05:01:58PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Pass BIT(DRM_ROTATE_0) instead of DRM_ROTATE_0 to skl_update_scaler(). The former is a mask, the latter just the bit number.

Quoted 8 lines
Quoted 6 lines

Fortunately the only thing skl_update_scaler() does with the rotation is check if it's 90/270 degrees or not, and so in this case it would still do the right thing.

Ping, anyone care to r-b this one?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Looks like this bug has been present since scalers were first added in 6156a45602f9 ("drm/i915: skylake primary plane scaling using shared scalers")

Pushed to dinq an appropriate Fixes: comment added. Thanks for the review.

Do we have an igt for this? If not need to capture it and make it something we must fixe before more scaler stuff lands.

There's no change in behavior from this fix, so there's nothing to test.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw
Quoted 24 lines · Ville Syrjälä
Quoted 23 lines · Daniel Vetter
Quoted 22 lines · Ville Syrjälä
Quoted 20 lines · Matt Roper
Quoted 6 lines · Ville Syrjälä
Quoted 5 lines · On Thu, Oct 15, 2015 at 05:01:58PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Pass BIT(DRM_ROTATE_0) instead of DRM_ROTATE_0 to skl_update_scaler(). The former is a mask, the latter just the bit number.

Quoted 8 lines
Quoted 6 lines

Fortunately the only thing skl_update_scaler() does with the rotation is check if it's 90/270 degrees or not, and so in this case it would still do the right thing.

Ping, anyone care to r-b this one?

Looks like this bug has been present since scalers were first added in 6156a45602f9 ("drm/i915: skylake primary plane scaling using shared scalers")

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Pushed to dinq an appropriate Fixes: comment added. Thanks for the review.

Do we have an igt for this? If not need to capture it and make it something we must fixe before more scaler stuff lands.

There's no change in behavior from this fix, so there's nothing to test.

Ah, should have read things more carefully, I thought this was the fix for the other recent rotation fail you've patched. _That_ on definitely should come with an igt.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx