[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOCHtYiCq6SBadzashe+mwKmx8_23=-++zyhRM=dtjEbgrQ98w@mail.gmail.com>
Date: Fri, 18 Apr 2014 09:31:34 -0500
From: Robert Nelson <robertcnelson@...il.com>
To: Boris BREZILLON <boris.brezillon@...e-electrons.com>
Cc: Jean-Jacques Hiblot <jjhiblot@...phandler.com>,
Nicolas Ferre <nicolas.ferre@...el.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
dri-devel@...ts.freedesktop.org, airlied@...ux.ie,
robdclark@...il.com,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
linux kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 1/3] atmel: drm: added drm driver for the atmel hlcd controller
On Fri, Apr 18, 2014 at 8:21 AM, Boris BREZILLON
<boris.brezillon@...e-electrons.com> wrote:
> Hi JJ,
>
> On 18/04/2014 11:45, Jean-Jacques Hiblot wrote:
>> +
>> +static void update_scanout(struct drm_crtc *crtc)
>> +{
>> + struct atmel_hlcdc_crtc *hlcdc_crtc = to_atmel_hlcdc_crtc(crtc);
>> + struct drm_device *dev = crtc->dev;
>> + struct atmel_hlcdc_drm_private *priv = dev->dev_private;
>> + struct drm_framebuffer *fb = crtc->fb;
>> +
>
> I guess you meant
>
> struct drm_framebuffer *fb = hclcd_crtc->fb;
>
>
> because otherwise you get an error when compiling (there are similar
> issues below).
This fixes this with v3.15-rc1
diff --git a/drivers/gpu/drm/atmel_hlcdc/atmel_hlcdc_crtc.c
b/drivers/gpu/drm/atmel_hlcdc/atmel_hlcdc_crtc.c
index 649fa19..a111d69 100644
--- a/drivers/gpu/drm/atmel_hlcdc/atmel_hlcdc_crtc.c
+++ b/drivers/gpu/drm/atmel_hlcdc/atmel_hlcdc_crtc.c
@@ -81,7 +81,7 @@ static void update_scanout(struct drm_crtc *crtc)
struct atmel_hlcdc_crtc *hlcdc_crtc = to_atmel_hlcdc_crtc(crtc);
struct drm_device *dev = crtc->dev;
struct atmel_hlcdc_drm_private *priv = dev->dev_private;
- struct drm_framebuffer *fb = crtc->fb;
+ struct drm_framebuffer *fb = crtc->primary->fb;
struct drm_gem_cma_object *gem;
struct atmel_hlcd_dma_desc *desc = hlcdc_crtc->dma_descs[DMA_BASE];
@@ -188,7 +188,7 @@ static int atmel_hlcdc_crtc_page_flip(struct drm_crtc *crtc,
return -EBUSY;
}
- crtc->fb = fb;
+ crtc->primary->fb = fb;
atmel_hlcdc_crtc->event = event;
update_scanout(crtc);
return 0;
@@ -397,7 +397,7 @@ static int atmel_hlcdc_crtc_mode_set(struct drm_crtc *crtc,
hlcdc_write(dev, ATMEL_LCDC_BASECFG0,
LCDC_BASECFG0_BLEN_AHB_INCR16 | LCDC_BASECFG0_DLBO);
- drm_fb_get_bpp_depth(crtc->fb->pixel_format, &depth, &bpp);
+ drm_fb_get_bpp_depth(crtc->primary->fb->pixel_format, &depth, &bpp);
hlcdc_write(dev, ATMEL_LCDC_BASECFG1,
atmel_hlcdfb_get_rgbmode(dev->dev, depth, bpp));
hlcdc_write(dev, ATMEL_LCDC_BASECFG2, 0);
Tested-by: Robert Nelson <robertcnelson@...il.com>
digs out my 31/33/34, should have a patch for them in a bit...
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists