linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
  • * [PATCH 7/9] drm/rockchip: Use drm_plane_helper_check_state()
           [not found] <1469549224-1860-1-git-send-email-ville.syrjala@linux.intel.com>
           [not found] ` <1469549224-1860-1-git-send-email-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
    @ 2016-07-26 16:07 ` ville.syrjala
      2016-07-27  1:09   ` Mark yao
      2016-08-01 15:10   ` [Intel-gfx] " Sean Paul
      1 sibling, 2 replies; 6+ messages in thread
    From: ville.syrjala @ 2016-07-26 16:07 UTC (permalink / raw)
      To: dri-devel; +Cc: linux-rockchip, intel-gfx, Yao
    
    From: Ville Syrjälä <ville.syrjala@linux.intel.com>
    
    Replace the use of drm_plane_helper_check_update() with
    drm_plane_helper_check_state() since we have a plane state.
    
    Rockchip looks to handling plane clipping rather well already
    (unlikje most arm drm drivers) so there are no function changes
    here.
    
    Cc: Yao <mark.yao@rock-chips.com>
    Cc: linux-rockchip@lists.infradead.org
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    ---
     drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 25 +++++--------------------
     1 file changed, 5 insertions(+), 20 deletions(-)
    
    diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
    index c566c740ab49..31744fe99b38 100644
    --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
    +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
    @@ -591,10 +591,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
     	struct vop_win *vop_win = to_vop_win(plane);
     	struct vop_plane_state *vop_plane_state = to_vop_plane_state(state);
     	const struct vop_win_data *win = vop_win->data;
    -	bool visible;
     	int ret;
    -	struct drm_rect *dest = &state->dst;
    -	struct drm_rect *src = &state->src;
     	struct drm_rect clip;
     	int min_scale = win->phy->scl ? FRAC_16_16(1, 8) :
     					DRM_PLANE_HELPER_NO_SCALING;
    @@ -608,30 +605,18 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
     	if (WARN_ON(!crtc_state))
     		return -EINVAL;
     
    -	src->x1 = state->src_x;
    -	src->y1 = state->src_y;
    -	src->x2 = state->src_x + state->src_w;
    -	src->y2 = state->src_y + state->src_h;
    -	dest->x1 = state->crtc_x;
    -	dest->y1 = state->crtc_y;
    -	dest->x2 = state->crtc_x + state->crtc_w;
    -	dest->y2 = state->crtc_y + state->crtc_h;
    -
     	clip.x1 = 0;
     	clip.y1 = 0;
     	clip.x2 = crtc_state->adjusted_mode.hdisplay;
     	clip.y2 = crtc_state->adjusted_mode.vdisplay;
     
    -	ret = drm_plane_helper_check_update(plane, crtc, state->fb,
    -					    src, dest, &clip,
    -					    state->rotation,
    -					    min_scale,
    -					    max_scale,
    -					    true, true, &visible);
    +	ret = drm_plane_helper_check_state(state, &clip,
    +					   min_scale, max_scale,
    +					   true, true);
     	if (ret)
     		return ret;
     
    -	if (!visible)
    +	if (!state->visible)
     		goto out_disable;
     
     	vop_plane_state->format = vop_convert_format(fb->pixel_format);
    @@ -642,7 +627,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
     	 * Src.x1 can be odd when do clip, but yuv plane start point
     	 * need align with 2 pixel.
     	 */
    -	if (is_yuv_support(fb->pixel_format) && ((src->x1 >> 16) % 2))
    +	if (is_yuv_support(fb->pixel_format) && ((state->src.x1 >> 16) % 2))
     		return -EINVAL;
     
     	vop_plane_state->enable = true;
    -- 
    2.7.4
    
    _______________________________________________
    Intel-gfx mailing list
    Intel-gfx@lists.freedesktop.org
    https://lists.freedesktop.org/mailman/listinfo/intel-gfx
    
    ^ permalink raw reply related	[flat|nested] 6+ messages in thread

  • end of thread, other threads:[~2016-08-01 15:10 UTC | newest]
    
    Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <1469549224-1860-1-git-send-email-ville.syrjala@linux.intel.com>
         [not found] ` <1469549224-1860-1-git-send-email-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
    2016-07-26 16:07   ` [PATCH 6/9] drm/rockchip: Use drm_plane_state.{src,dst} ville.syrjala-VuQAYsv1563Yd54FQh9/CA
    2016-07-27  1:08     ` Mark yao
    2016-08-01 15:10     ` [Intel-gfx] [PATCH 6/9] drm/rockchip: Use drm_plane_state.{src, dst} Sean Paul
    2016-07-26 16:07 ` [PATCH 7/9] drm/rockchip: Use drm_plane_helper_check_state() ville.syrjala
    2016-07-27  1:09   ` Mark yao
    2016-08-01 15:10   ` [Intel-gfx] " 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).