linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] drm/msm: dpu: Remove impossible checks
@ 2018-09-11 20:15 Sean Paul
       [not found] ` <20180911201550.210810-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Sean Paul @ 2018-09-11 20:15 UTC (permalink / raw)
  To: abhinavk-sgV2jX0FEOL9JmXXK+q4OQ, jsanka-sgV2jX0FEOL9JmXXK+q4OQ,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	bzwang-F7+t8E8rja9g9hUCZPvPmw
  Cc: Rob Clark, Sean Paul

From: Sean Paul <seanpaul@chromium.org>

This patch removes some checks which are impossible to hit. As a result,
we can move some of the local var assignments into the declarations.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 46de0de466ff..0f428f66b951 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1080,30 +1080,13 @@ static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
 		struct drm_plane_state *state)
 {
 	int ret = 0;
-	struct dpu_plane *pdpu;
-	struct dpu_plane_state *pstate;
+	struct dpu_plane *pdpu = to_dpu_plane(plane);
 	const struct dpu_format *fmt;
 	struct drm_rect src, dst, fb_rect = { 0 };
 	uint32_t max_upscale = 1, max_downscale = 1;
 	uint32_t min_src_size, max_linewidth;
 	int hscale = 1, vscale = 1;
 
-	if (!plane || !state) {
-		DPU_ERROR("invalid arg(s), plane %d state %d\n",
-				plane != 0, state != 0);
-		ret = -EINVAL;
-		goto exit;
-	}
-
-	pdpu = to_dpu_plane(plane);
-	pstate = to_dpu_plane_state(state);
-
-	if (!pdpu->pipe_sblk) {
-		DPU_ERROR_PLANE(pdpu, "invalid catalog\n");
-		ret = -EINVAL;
-		goto exit;
-	}
-
 	src.x1 = state->src_x >> 16;
 	src.y1 = state->src_y >> 16;
 	src.x2 = src.x1 + (state->src_w >> 16);
-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

end of thread, other threads:[~2018-09-12 13:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-11 20:15 [PATCH 1/7] drm/msm: dpu: Remove impossible checks Sean Paul
     [not found] ` <20180911201550.210810-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-11 20:15   ` [PATCH 2/7] drm/msm: dpu: Move atomic_check_plane_state() call to atomic_check Sean Paul
     [not found]     ` <20180911201550.210810-2-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-11 22:44       ` Jeykumar Sankaran
     [not found]         ` <dcd200557d2b1c920bf6e7b42e5567db-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-09-12 13:39           ` Sean Paul
2018-09-11 20:15   ` [PATCH 3/7] drm/msm: dpu: Consolodate atomic_check functions() Sean Paul
     [not found]     ` <20180911201550.210810-3-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-11 22:48       ` Jeykumar Sankaran
2018-09-11 20:15   ` [PATCH 4/7] drm/msm: dpu: Remove dpu_plane_sspp_enabled() Sean Paul
2018-09-11 20:15   ` [PATCH 5/7] drm/msm: dpu: Remove dpu_plane_enabled() Sean Paul
2018-09-11 20:15   ` [PATCH 6/7] drm/msm: dpu: Make dpu_plane_sspp_atomic_update() void Sean Paul
2018-09-11 20:15   ` [PATCH 7/7] drm/msm: dpu: Don't continue after error in atomic_check Sean Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).