From patchwork Fri Apr 18 14:31:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Nelson X-Patchwork-Id: 4016471 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 73FDEBFF02 for ; Fri, 18 Apr 2014 14:31:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8201F203B1 for ; Fri, 18 Apr 2014 14:31:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 520C3203AF for ; Fri, 18 Apr 2014 14:31:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B3E796EC76; Fri, 18 Apr 2014 07:31:36 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yh0-f51.google.com (mail-yh0-f51.google.com [209.85.213.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E2236EC76 for ; Fri, 18 Apr 2014 07:31:35 -0700 (PDT) Received: by mail-yh0-f51.google.com with SMTP id f10so1520795yha.38 for ; Fri, 18 Apr 2014 07:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nsKMxWKPNn2WC2qwTWsM/43F9c0BS3wbMNB0pQb1h0A=; b=KH+b1USfZpRQVVr5pCGCJHELP6G4ZchD0V6+Z6VE4RSlekPSqFH7B7XX4NpG225dhC 1tgJufCwK0RcXijMOWsgOO5lCcgk6F5/QNNltaiMVMhrgsOni6n8szmDKxAy1kG6IN4S RaRitxsLOiziK8egwtILHnoly3P0ucFYp/M3KArezi7DCsNIdelzs4p1AUCyv/LsXkGz SyYbjiO2bWPgAvEMUSTPda+qVuOTslWiezKQHbmQBSAIGME/++YpQplZa5as+H0kfPs+ qyZvE1MglUiwwzrnxzvD+8G1TA20AhLfaHfGDLMXKxmeAdqesqVC2XLdu1OUlM74znkg WiOw== MIME-Version: 1.0 X-Received: by 10.236.93.16 with SMTP id k16mr798856yhf.140.1397831494387; Fri, 18 Apr 2014 07:31:34 -0700 (PDT) Received: by 10.170.188.143 with HTTP; Fri, 18 Apr 2014 07:31:34 -0700 (PDT) In-Reply-To: <535126D2.4080406@free-electrons.com> References: <1397814309-32160-1-git-send-email-jjhiblot@traphandler.com> <1397814309-32160-2-git-send-email-jjhiblot@traphandler.com> <535126D2.4080406@free-electrons.com> Date: Fri, 18 Apr 2014 09:31:34 -0500 Message-ID: Subject: Re: [RFC 1/3] atmel: drm: added drm driver for the atmel hlcd controller From: Robert Nelson To: Boris BREZILLON Cc: Jean-Jacques Hiblot , Nicolas Ferre , linux kernel , dri-devel@lists.freedesktop.org, Jean-Christophe PLAGNIOL-VILLARD , "linux-arm-kernel@lists.infradead.org" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Apr 18, 2014 at 8:21 AM, Boris BREZILLON 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 Tested-by: Robert Nelson digs out my 31/33/34, should have a patch for them in a bit... Regards, 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);