All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/rcar-du: Use drm_mode_get_hv_timing() to populate plane clip rectangle
@ 2018-01-23 17:08 Ville Syrjala
  2018-01-23 17:08 ` [PATCH 2/5] drm/sun4i: " Ville Syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 34+ messages in thread
From: Ville Syrjala @ 2018-01-23 17:08 UTC (permalink / raw)
  To: dri-devel; +Cc: Laurent Pinchart

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Use drm_mode_get_hv_timing() to fill out the plane clip rectangle.

No functional changes as the code already uses crtc_state->mode
to populate the clip, which is also what drm_mode_get_hv_timing()
uses.

Once everyone agrees on this we can move the clip handling into
drm_atomic_helper_check_plane_state().

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_plane.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
index 4a3d16cf3ed6..5687a94d4cb1 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
@@ -572,7 +572,7 @@ int __rcar_du_plane_atomic_check(struct drm_plane *plane,
 {
 	struct drm_device *dev = plane->dev;
 	struct drm_crtc_state *crtc_state;
-	struct drm_rect clip;
+	struct drm_rect clip = {};
 	int ret;
 
 	if (!state->crtc) {
@@ -589,10 +589,9 @@ int __rcar_du_plane_atomic_check(struct drm_plane *plane,
 	if (IS_ERR(crtc_state))
 		return PTR_ERR(crtc_state);
 
-	clip.x1 = 0;
-	clip.y1 = 0;
-	clip.x2 = crtc_state->mode.hdisplay;
-	clip.y2 = crtc_state->mode.vdisplay;
+	if (crtc_state->enable)
+		drm_mode_get_hv_timing(&crtc_state->mode,
+				       &clip.x2, &clip.y2);
 
 	ret = drm_atomic_helper_check_plane_state(state, crtc_state, &clip,
 						  DRM_PLANE_HELPER_NO_SCALING,
-- 
2.13.6

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2018-03-05 18:58 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23 17:08 [PATCH 1/5] drm/rcar-du: Use drm_mode_get_hv_timing() to populate plane clip rectangle Ville Syrjala
2018-01-23 17:08 ` [PATCH 2/5] drm/sun4i: " Ville Syrjala
2018-02-02 15:04   ` Ville Syrjälä
2018-01-23 17:08 ` [PATCH 3/5] drm/armada: Construct a temporary crtc state for plane checks Ville Syrjala
2018-01-23 18:42   ` Russell King - ARM Linux
2018-01-23 19:02     ` Ville Syrjälä
2018-02-02 14:10       ` Ville Syrjälä
2018-02-02 15:10         ` Ville Syrjälä
2018-02-23 15:55           ` Ville Syrjälä
2018-02-23 19:14             ` Russell King - ARM Linux
2018-01-23 17:08 ` [PATCH 4/5] drm/armada: Use drm_mode_get_hv_timing() to populate plane clip rectangle Ville Syrjala
2018-03-05  8:41   ` Daniel Vetter
2018-03-05 18:58     ` Ville Syrjälä
2018-01-23 17:08 ` [PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state() Ville Syrjala
2018-01-23 17:08   ` Ville Syrjala
2018-01-23 17:08   ` Ville Syrjala
2018-01-23 17:46   ` Liviu Dudau
2018-01-23 17:46     ` Liviu Dudau
2018-01-23 17:46     ` Liviu Dudau
2018-01-23 18:06   ` Philipp Zabel
2018-01-23 18:06     ` Philipp Zabel
2018-01-23 18:06     ` Philipp Zabel
2018-01-24  0:12   ` Laurent Pinchart
2018-01-24 19:48   ` Sinclair Yeh
2018-01-24 19:48     ` Sinclair Yeh
2018-01-24 19:48     ` Sinclair Yeh
2018-01-26  5:23   ` Neil Armstrong
2018-01-26  5:23     ` Neil Armstrong
2018-01-26  5:23     ` Neil Armstrong
2018-02-05  6:50   ` Shawn Guo
2018-02-05  6:50     ` Shawn Guo
2018-02-05  6:50     ` Shawn Guo
2018-01-24  0:07 ` [PATCH 1/5] drm/rcar-du: Use drm_mode_get_hv_timing() to populate plane clip rectangle Laurent Pinchart
2018-01-24 15:01   ` Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.