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=-6.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 4D846C433DF for ; Fri, 22 May 2020 18:14:10 +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 1B656206F6 for ; Fri, 22 May 2020 18:14:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z/VXBNCr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B656206F6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 A01D76E877; Fri, 22 May 2020 18:14:08 +0000 (UTC) Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) by gabe.freedesktop.org (Postfix) with ESMTPS id C213C6E877 for ; Fri, 22 May 2020 18:14:07 +0000 (UTC) Received: by mail-vs1-xe42.google.com with SMTP id u2so6529616vsi.13 for ; Fri, 22 May 2020 11:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wk1gbg+bM/GmwTo+ErImdJXdcBRK1O8Y6ClkW84B2gk=; b=Z/VXBNCrQukwB/grZDpR4JRrrIFVDGnXPVQGzoZdFZSY9+lsS7zBSg3/y4yKjgfGGY Hlj5ggTwWFhM4Iu+lrCmvA/kpLeGMAEh9IBnukVKYeQ8XAlipwDOSWtp/zxdlarZe0Ab KvXgH4mWD1TMWCfzlY+BRVaZhSueDefG7JQ044dDwB4FuVwzuDfMKV4biTRnF4wmMIVF 0PIelwwEPF7vEwG9a+xjdmbaEJYqeCTRbseyqHHRd32tKMngQOFIoy6wi8U41id/FPlT xKNkFeRVWoORZy8tZs1IuTypjJJhRKlaDx+UHqOEQNGDW+9x3RIdi/uKd2jmGF7NS5Ox g+kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wk1gbg+bM/GmwTo+ErImdJXdcBRK1O8Y6ClkW84B2gk=; b=i27cujmS6EFlCZ20hbyAWMGq7KfKMkyDmCvYCJgQ+TWZHg1kttEixY//YywgWhl2ss tkFXi1S6mThuIqdIu13uzu0PYAx+Ephf1Ib08tLwNObG6XnxIhpNkNKKGdaGouvPmoHJ pAEeUkbz7i2iIfT5TKLF38hGm45+36ZMGCpwLdjjdssJobe0DgMNuxI6nZSLcJr67tXC HQpyEEapyeCddj+8XZzinAUQbvijirdtSLe1bfR11xHRKPwwR8NK1aG357Y0R7sy7ZZS bSBHFkr3A04cTKPGOiKXaLVroRKo8TUm1soDEsByjpqxtCwiE7gs/vO089edV2xuWrBb PV0g== X-Gm-Message-State: AOAM532lU9Ypvz7IRoXf+1xcu7rJTNcitZ2rNqw5PfapS1z6ezwUi9Bq LdMrpXPnmLQdvT2YyAgYRCmaiLHtahA1TggK5zw= X-Google-Smtp-Source: ABdhPJz+FS0+nkoHuNauP4SBN7HFaoJApeyTujO2QZSYWTwKxkjR6gI9c6cMAPRYKxV76mdsTNNwl7AcQJAkrkUUF7M= X-Received: by 2002:a67:71c2:: with SMTP id m185mr12109967vsc.186.1590171246836; Fri, 22 May 2020 11:14:06 -0700 (PDT) MIME-Version: 1.0 References: <20200522135246.10134-1-tzimmermann@suse.de> <20200522135246.10134-8-tzimmermann@suse.de> In-Reply-To: <20200522135246.10134-8-tzimmermann@suse.de> From: Emil Velikov Date: Fri, 22 May 2020 19:11:09 +0100 Message-ID: Subject: Re: [PATCH 07/21] drm/hisilicon/kirin: Use GEM CMA object functions To: Thomas Zimmermann 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: alexandre.belloni@bootlin.com, linux-aspeed@lists.ozlabs.org, Neil Armstrong , Dave Airlie , Liviu Dudau , Philippe Cornu , Paul Cercueil , Laurent Pinchart , Mihail Atanassov , Sam Ravnborg , Alexandre Torgue , =?UTF-8?B?TWFyZWsgVmHFoXV0?= , Alexey Brodkin , ludovic.desroches@microchip.com, Xinliang Liu , Xinwei Kong , Tomi Valkeinen , "james qian wang \(Arm Technology China\)" , joel@jms.id.au, NXP Linux Team , Chen Feng , Sascha Hauer , Alison Wang , Jyri Sarha , Chen-Yu Tsai , Vincent Abriou , Sascha Hauer , LAKML , Maxime Coquelin , bbrezillon@kernel.org, andrew@aj.id.au, ML dri-devel , nicolas.ferre@microchip.com, Yannick Fertre , Kieran Bingham , khilman@baylibre.com, Rongrong Zou , Shawn Guo Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Thomas, On Fri, 22 May 2020 at 14:53, Thomas Zimmermann wrote: > > The kirin driver uses the default implementation for CMA functions; except > for the .dumb_create callback. The __DRM_GEM_CMA_DRIVER_OPS macro now sets > these defaults and .dumb_create in struct drm_driver. All remaining > operations are provided by CMA GEM object functions. > > Signed-off-by: Thomas Zimmermann > --- > drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > index c339e632522a9..b1ffd7d43e562 100644 > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > @@ -921,17 +921,7 @@ DEFINE_DRM_GEM_CMA_FOPS(ade_fops); > static struct drm_driver ade_driver = { > .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, > .fops = &ade_fops, > - .gem_free_object_unlocked = drm_gem_cma_free_object, > - .gem_vm_ops = &drm_gem_cma_vm_ops, > - .dumb_create = drm_gem_cma_dumb_create_internal, This doesn't seem right. The _internal documentation explicitly says that this should _not_ be used as .dumb_create. Instead drivers should use it to implement their callback. Since it yields the same result as drm_gem_cma_dumb_create we can use the default macro below. Weather to the .dumb_create in separate patch, or squash it here - I'll leave to you. In case of the latter, please mentioned it in the commit message. -Emil _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel