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: 4016491 Return-Path: X-Original-To: patchwork-linux-arm@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 B3CC9BFF02 for ; Fri, 18 Apr 2014 14:41:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6FEC203B4 for ; Fri, 18 Apr 2014 14:41:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4C432026C for ; Fri, 18 Apr 2014 14:41:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wb9vk-0000Fw-MJ; Fri, 18 Apr 2014 14:38:16 +0000 Received: from mail-yh0-f48.google.com ([209.85.213.48]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wb9vh-0008IK-AR for linux-arm-kernel@lists.infradead.org; Fri, 18 Apr 2014 14:38:14 +0000 Received: by mail-yh0-f48.google.com with SMTP id z6so1515373yhz.35 for ; Fri, 18 Apr 2014 07:37:46 -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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140418_073813_464195_F596766B X-CRM114-Status: GOOD ( 15.33 ) X-Spam-Score: -0.8 (/) Cc: Jean-Jacques Hiblot , airlied@linux.ie, Nicolas Ferre , linux kernel , dri-devel@lists.freedesktop.org, robdclark@gmail.com, Jean-Christophe PLAGNIOL-VILLARD , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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);