Message ID | 1465428739-26529-9-git-send-email-laurent.pinchart@ideasonboard.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jun 09, 2016 at 02:32:12AM +0300, Laurent Pinchart wrote: > The driver needs the number of bytes per pixel, not the bpp and depth > info meant for fbdev compatibility. Use the right API. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/arm/hdlcd_crtc.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > Cc: Liviu Dudau <liviu.dudau@arm.com> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> Thanks for the cleanup! Best regards, Liviu > > diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c > index 0813c2f06931..b93a4ce01c50 100644 > --- a/drivers/gpu/drm/arm/hdlcd_crtc.c > +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c > @@ -242,14 +242,12 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, > { > struct hdlcd_drm_private *hdlcd; > struct drm_gem_cma_object *gem; > - unsigned int depth, bpp; > u32 src_w, src_h, dest_w, dest_h; > dma_addr_t scanout_start; > > if (!plane->state->fb) > return; > > - drm_fb_get_bpp_depth(plane->state->fb->pixel_format, &depth, &bpp); > src_w = plane->state->src_w >> 16; > src_h = plane->state->src_h >> 16; > dest_w = plane->state->crtc_w; > @@ -257,7 +255,8 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, > gem = drm_fb_cma_get_gem_obj(plane->state->fb, 0); > scanout_start = gem->paddr + plane->state->fb->offsets[0] + > plane->state->crtc_y * plane->state->fb->pitches[0] + > - plane->state->crtc_x * bpp / 8; > + plane->state->crtc_x * > + drm_format_plane_cpp(plane->state->fb->pixel_format, 0); > > hdlcd = plane->dev->dev_private; > hdlcd_write(hdlcd, HDLCD_REG_FB_LINE_LENGTH, plane->state->fb->pitches[0]); > -- > Regards, > > Laurent Pinchart >
On Thu, Jun 09, 2016 at 10:01:40AM +0100, Liviu Dudau wrote: > On Thu, Jun 09, 2016 at 02:32:12AM +0300, Laurent Pinchart wrote: > > The driver needs the number of bytes per pixel, not the bpp and depth > > info meant for fbdev compatibility. Use the right API. > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > drivers/gpu/drm/arm/hdlcd_crtc.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > Cc: Liviu Dudau <liviu.dudau@arm.com> > > Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> > > Thanks for the cleanup! > > Best regards, > Liviu Hi Laurent, What is the status of this patchset? Are you going to send it for v4.8? Best regards, Liviu > > > > > diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c > > index 0813c2f06931..b93a4ce01c50 100644 > > --- a/drivers/gpu/drm/arm/hdlcd_crtc.c > > +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c > > @@ -242,14 +242,12 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, > > { > > struct hdlcd_drm_private *hdlcd; > > struct drm_gem_cma_object *gem; > > - unsigned int depth, bpp; > > u32 src_w, src_h, dest_w, dest_h; > > dma_addr_t scanout_start; > > > > if (!plane->state->fb) > > return; > > > > - drm_fb_get_bpp_depth(plane->state->fb->pixel_format, &depth, &bpp); > > src_w = plane->state->src_w >> 16; > > src_h = plane->state->src_h >> 16; > > dest_w = plane->state->crtc_w; > > @@ -257,7 +255,8 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, > > gem = drm_fb_cma_get_gem_obj(plane->state->fb, 0); > > scanout_start = gem->paddr + plane->state->fb->offsets[0] + > > plane->state->crtc_y * plane->state->fb->pitches[0] + > > - plane->state->crtc_x * bpp / 8; > > + plane->state->crtc_x * > > + drm_format_plane_cpp(plane->state->fb->pixel_format, 0); > > > > hdlcd = plane->dev->dev_private; > > hdlcd_write(hdlcd, HDLCD_REG_FB_LINE_LENGTH, plane->state->fb->pitches[0]); > > -- > > Regards, > > > > Laurent Pinchart > >
Hi Liviu, On Monday 25 Jul 2016 12:10:24 Liviu Dudau wrote: > On Thu, Jun 09, 2016 at 10:01:40AM +0100, Liviu Dudau wrote: > > On Thu, Jun 09, 2016 at 02:32:12AM +0300, Laurent Pinchart wrote: > > > The driver needs the number of bytes per pixel, not the bpp and depth > > > info meant for fbdev compatibility. Use the right API. > > > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > --- > > > > > > drivers/gpu/drm/arm/hdlcd_crtc.c | 5 ++--- > > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > > > Cc: Liviu Dudau <liviu.dudau@arm.com> > > > > Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> > > > > Thanks for the cleanup! > > > > Best regards, > > Liviu > > Hi Laurent, > > What is the status of this patchset? Are you going to send it for v4.8? I'm afraid not :-) I have just sent a rebased version (v4).
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c index 0813c2f06931..b93a4ce01c50 100644 --- a/drivers/gpu/drm/arm/hdlcd_crtc.c +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c @@ -242,14 +242,12 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, { struct hdlcd_drm_private *hdlcd; struct drm_gem_cma_object *gem; - unsigned int depth, bpp; u32 src_w, src_h, dest_w, dest_h; dma_addr_t scanout_start; if (!plane->state->fb) return; - drm_fb_get_bpp_depth(plane->state->fb->pixel_format, &depth, &bpp); src_w = plane->state->src_w >> 16; src_h = plane->state->src_h >> 16; dest_w = plane->state->crtc_w; @@ -257,7 +255,8 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, gem = drm_fb_cma_get_gem_obj(plane->state->fb, 0); scanout_start = gem->paddr + plane->state->fb->offsets[0] + plane->state->crtc_y * plane->state->fb->pitches[0] + - plane->state->crtc_x * bpp / 8; + plane->state->crtc_x * + drm_format_plane_cpp(plane->state->fb->pixel_format, 0); hdlcd = plane->dev->dev_private; hdlcd_write(hdlcd, HDLCD_REG_FB_LINE_LENGTH, plane->state->fb->pitches[0]);
The driver needs the number of bytes per pixel, not the bpp and depth info meant for fbdev compatibility. Use the right API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- drivers/gpu/drm/arm/hdlcd_crtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Cc: Liviu Dudau <liviu.dudau@arm.com>