Skip to contentSkip to conversation

drm/i915: Fix crtc_y assignment in intel_find_initial_plane_obj()

PATCH Applied [email protected] 3 participants 5 messages Nov 13, 2015 – Nov 16, 2015

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

PATCH 1/1 drm/i915: Fix crtc_y assignment in intel_find_initial_plane_obj()

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

Let's set crtc_y to 0 instead of setting src_y twice.

Multiple assignments in one statement is a good way to hide bugs. Please don't do that.

Cc Maarten Lankhorst <[email protected]>
Fixes be5651f2d581 ("drm/i915: Update missing properties in find_initial_plane_obj")
---
 drivers/gpu/drm/i915/intel_display.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -2
index d7c8a0f..e3db46d 100644
@@ -2640,11 +2640,13 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 	return;
 
 valid_fb:
-	plane_state->src_x = plane_state->src_y = 0;
+	plane_state->src_x = 0;
+	plane_state->src_y = 0;
 	plane_state->src_w = fb->width << 16;
 	plane_state->src_h = fb->height << 16;
 
-	plane_state->crtc_x = plane_state->src_y = 0;
+	plane_state->crtc_x = 0;
+	plane_state->crtc_y = 0;
 	plane_state->crtc_w = fb->width;
 	plane_state->crtc_h = fb->height;
 
Signature · 6 lines
2.4.10

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#1 lore raw
Quoted 9 lines · On Fri, 13 Nov 2015, [email protected] wrote:

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

Let's set crtc_y to 0 instead of setting src_y twice.

Multiple assignments in one statement is a good way to hide bugs. Please don't do that.

Cc Maarten Lankhorst <[email protected]>
Fixes be5651f2d581 ("drm/i915: Update missing properties in find_initial_plane_obj")

right?

Quoted 24 lines
---
 drivers/gpu/drm/i915/intel_display.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -2
index d7c8a0f..e3db46d 100644
@@ -2640,11 +2640,13 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 	return;
 
 valid_fb:
-	plane_state->src_x = plane_state->src_y = 0;
+	plane_state->src_x = 0;
+	plane_state->src_y = 0;
 	plane_state->src_w = fb->width << 16;
 	plane_state->src_h = fb->height << 16;
 
-	plane_state->crtc_x = plane_state->src_y = 0;
+	plane_state->crtc_x = 0;
+	plane_state->crtc_y = 0;
 	plane_state->crtc_w = fb->width;
 	plane_state->crtc_h = fb->height;
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 8 lines · Jani Nikula
Quoted 7 lines · On Fri, 13 Nov 2015, [email protected] wrote:

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

Let's set crtc_y to 0 instead of setting src_y twice.

Multiple assignments in one statement is a good way to hide bugs. Please don't do that.

Quoted 6 lines
Quoted 2 lines
Cc Maarten Lankhorst <[email protected]>
Fixes be5651f2d581 ("drm/i915: Update missing properties in find_initial_plane_obj")

right?

I think the state is kzalloc()ed, so there's probably no real bug here. Should have mentioned that in the commit message I suppose.

Quoted 29 lines
Quoted 26 lines
---
 drivers/gpu/drm/i915/intel_display.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -2
index d7c8a0f..e3db46d 100644
@@ -2640,11 +2640,13 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 	return;
 
 valid_fb:
-	plane_state->src_x = plane_state->src_y = 0;
+	plane_state->src_x = 0;
+	plane_state->src_y = 0;
 	plane_state->src_w = fb->width << 16;
 	plane_state->src_h = fb->height << 16;
 
-	plane_state->crtc_x = plane_state->src_y = 0;
+	plane_state->crtc_x = 0;
+	plane_state->crtc_y = 0;
 	plane_state->crtc_w = fb->width;
 	plane_state->crtc_h = fb->height;
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
In reply to [email protected]

Op 13-11-15 om 18:16 schreef [email protected]:

Quoted 11 lines

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

Let's set crtc_y to 0 instead of setting src_y twice.

Multiple assignments in one statement is a good way to hide bugs. Please don't do that.

Cc Maarten Lankhorst <[email protected]>
Fixes be5651f2d581 ("drm/i915: Update missing properties in find_initial_plane_obj")

Oops.

R-b
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer Applied
#4 lore raw
Quoted 8 lines · Maarten Lankhorst

Op 13-11-15 om 18:16 schreef [email protected]:

Quoted 7 lines

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

Let's set crtc_y to 0 instead of setting src_y twice.

Multiple assignments in one statement is a good way to hide bugs. Please don't do that.

Quoted 7 lines
Quoted 4 lines
Cc Maarten Lankhorst <[email protected]>
Fixes be5651f2d581 ("drm/i915: Update missing properties in find_initial_plane_obj")

Oops.

R-b

Pushed to drm-intel-fixes, thanks for the patch and review.

Maarten, please give Damien and our tooling a chance and spell out the R-b...

BR,
Jani.

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx