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=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 EF317C2B9F8 for ; Tue, 25 May 2021 17:48:21 +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 2FFEF61186 for ; Tue, 25 May 2021 17:48:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FFEF61186 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=tronnes.org 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 9F02E6EA94; Tue, 25 May 2021 17:48:20 +0000 (UTC) Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id EBD7789FA5; Tue, 25 May 2021 17:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tronnes.org ; s=ds202012; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:Subject:References:Cc:To:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zmoLsFOrzQDEdiV5XVjjW7fW8PfWEsE+4/phaTnnNd4=; b=XF5ttKXYKr1qN7YE0Frd4A+b3i efyuHSAnRS6oyytUeN0cM+PV1Rbrvb1PVxK165Z2Dyf48pucFlicJMryShYcnXZ6PWWhGYjwf5h45 zsQQvpAs2XP0WOvbIhuuCY+A2T3KVPGpKYMPhdZEcYdunZlOF4cYkqY2aiFCUSQq57OTAU12jsHVK 6UIdLmlKTK6liXp+tNiASQEJ05ZAGwzzO+FkySlqQZjlWWeBQeoL28BsyJXRdPS0+txcPsbZ47YIf KX5p4Z5J2MjwKDPbKaZoITp1B4P0pSAJ/iQ01wm/AwMBL2cwfApNBwXkLm2XCR/qnro8KsS0oH55J 8dAcOdWQ==; Received: from [2a01:799:95f:4600:cca0:57ac:c55d:a485] (port=64708) by smtp.domeneshop.no with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1llbA9-0003uA-GQ; Tue, 25 May 2021 19:48:17 +0200 To: daniel.vetter@ffwll.ch References: <20210521090959.1663703-10-daniel.vetter@ffwll.ch> Subject: Re: [PATCH 10/11] drm/simple-helper: drm_gem_simple_display_pipe_prepare_fb as default From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: <9d855dc6-5825-4666-6d70-e5f3f880c592@tronnes.org> Date: Tue, 25 May 2021 19:48:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210521090959.1663703-10-daniel.vetter@ffwll.ch> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: airlied@linux.ie, daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org, tzimmermann@suse.de, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" > It's tedious to review this all the time, and my audit showed that > arcpgu actually forgot to set this. > > Make this the default and stop worrying. > > Again I sprinkled WARN_ON_ONCE on top to make sure we don't have > strange combinations of hooks: cleanup_fb without prepare_fb doesn't > make sense, and since simpler drivers are all new they better be GEM > based drivers. > > Signed-off-by: Daniel Vetter > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Daniel Vetter > --- > drivers/gpu/drm/drm_simple_kms_helper.c | 12 ++++++++++-- > include/drm/drm_simple_kms_helper.h | 7 +++++-- > 2 files changed, 15 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c > index 0b095a313c44..1a97571d97d9 100644 > --- a/drivers/gpu/drm/drm_simple_kms_helper.c > +++ b/drivers/gpu/drm/drm_simple_kms_helper.c > @@ -9,6 +9,8 @@ > #include > #include > #include > +#include > +#include > #include > #include > #include > @@ -225,8 +227,14 @@ static int drm_simple_kms_plane_prepare_fb(struct drm_plane *plane, > struct drm_simple_display_pipe *pipe; > > pipe = container_of(plane, struct drm_simple_display_pipe, plane); > - if (!pipe->funcs || !pipe->funcs->prepare_fb) > - return 0; > + if (!pipe->funcs || !pipe->funcs->prepare_fb) { > + if (WARN_ON_ONCE(drm_core_check_feature(plane->dev, DRIVER_GEM))) Shouldn't this check be inverted? Looks like it warns on GEM drivers. With that considered: Acked-by: Noralf Trønnes Hopefully this reply will thread correctly, I had to reply from lore (I wasn't cc'ed) and I don't know if Thunderbird sets In-Reply-To. I'm not subscribed to dri-devel anymore since I'm winding down my Linux work and dri-devel is such a high volume list. Noralf > + return 0; > + > + WARN_ON_ONCE(pipe->funcs && pipe->funcs->cleanup_fb); > + > + return drm_gem_simple_display_pipe_prepare_fb(pipe, state); > + } > > return pipe->funcs->prepare_fb(pipe, state); > }