From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08916C11D04 for ; Thu, 20 Feb 2020 11:24:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9CDB2071E for ; Thu, 20 Feb 2020 11:24:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9CDB2071E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F14A6ED34; Thu, 20 Feb 2020 11:24:12 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3810F6ED34 for ; Thu, 20 Feb 2020 11:24:11 +0000 (UTC) Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id BAEC8294D99; Thu, 20 Feb 2020 11:24:09 +0000 (GMT) Date: Thu, 20 Feb 2020 12:24:06 +0100 From: Boris Brezillon To: Andrzej Pietrasiewicz Subject: Re: [PATCHv5 33/34] drm/rockchip: Use helper for common task Message-ID: <20200220122406.383f4ea8@collabora.com> In-Reply-To: <20191217145020.14645-34-andrzej.p@collabora.com> References: <20191213173350.GJ624164@phenom.ffwll.local> <20191217145020.14645-1-andrzej.p@collabora.com> <20191217145020.14645-34-andrzej.p@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@collabora.com, Mihail Atanassov , David Airlie , Liviu Dudau , Sandy Huang , dri-devel@lists.freedesktop.org, James Wang , Ayan Halder , Sean Paul Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, 17 Dec 2019 15:50:19 +0100 Andrzej Pietrasiewicz wrote: > Use generic helper code. > > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c > index 221e72e71432..5806f908aa53 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c > @@ -18,6 +18,7 @@ > #include "rockchip_drm_fb.h" > #include "rockchip_drm_gem.h" > > + You can drop this blank line. Looks good otherwise, but I'll wait for v6 (with the new ->check_size() maybe) before giving my R-b. > static const struct drm_framebuffer_funcs rockchip_drm_fb_funcs = { > .destroy = drm_gem_fb_destroy, > .create_handle = drm_gem_fb_create_handle, > @@ -30,22 +31,13 @@ rockchip_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cm > { > struct drm_framebuffer *fb; > int ret; > - int i; > > fb = kzalloc(sizeof(*fb), GFP_KERNEL); > if (!fb) > return ERR_PTR(-ENOMEM); > > - drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); > - > - for (i = 0; i < num_planes; i++) > - fb->obj[i] = obj[i]; > - > - ret = drm_framebuffer_init(dev, fb, &rockchip_drm_fb_funcs); > + ret = drm_gem_fb_init_with_funcs(fb, dev, mode_cmd, obj, num_planes, &rockchip_drm_fb_funcs); > if (ret) { > - DRM_DEV_ERROR(dev->dev, > - "Failed to initialize framebuffer: %d\n", > - ret); > kfree(fb); > return ERR_PTR(ret); > } _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel