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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 60397C07E9A for ; Wed, 14 Jul 2021 08:45:59 +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 300E5611AB for ; Wed, 14 Jul 2021 08:45:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 300E5611AB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.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 A91BF6E1BA; Wed, 14 Jul 2021 08:45:58 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id E44D06E1BC for ; Wed, 14 Jul 2021 08:45:57 +0000 (UTC) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6AA383F1; Wed, 14 Jul 2021 10:45:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626252356; bh=kA2Y4FJIJGeEeTU6vVmBG77N+dXcBs2sjaI5o/JAHDE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S+2ubGoNIpLW7Tqls7ZKp7zx8L6fVH6bKC3NtP/CUIqn9Np+gv2BAisk0YqtEaOZc SurIaDmZs3qgkCYxggC0Gdgy8XH9IyWmrSuiLXrlIMt4sUbi80RYAfCQXtnvLfdFat SxGl+Maw4a/tcqyM4zGRdQKwA7GwtWj23mXVwmUc= Date: Wed, 14 Jul 2021 11:45:55 +0300 From: Laurent Pinchart To: Sam Ravnborg Subject: Re: [PATCH v1 1/1] drm: bridge: Mark mode_fixup deprecated Message-ID: References: <20210713193257.958852-1-sam@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210713193257.958852-1-sam@ravnborg.org> 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: David Airlie , Andrzej Hajda , dri-devel@lists.freedesktop.org, Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Sam, Thank you for the patch. On Tue, Jul 13, 2021 at 09:32:57PM +0200, Sam Ravnborg wrote: > Make it obvious that mode_fixup is deprecated and new drivers shall use > atomic_check. Could you also mark drm_bridge_chain_mode_fixup() as deprecated ? Regarding usage of .atomic_check(), while I agree that's the way to go, we have more work to do. .mode_fixup() was created a long time ago, when we were supposed to have a single bridge at the output of the CRTC. The bridge could then instruct the CRTC to output a different mode than what the display requires. Now that we have support for multiple bridges, it's not as straightforward, and we've so far just pretended to ignore the problem. The .mode_fixup() operation is used and abused, and just telling people to use .atomic_check() will likely make things worse as that operation has access to the full atomic commit and can alter the mode of pretty much anything. We need to define clear semantics for .atomic_check() in bridges. > Signed-off-by: Sam Ravnborg > Cc: Laurent Pinchart > Cc: Andrzej Hajda > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Daniel Vetter > --- > include/drm/drm_bridge.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h > index 46bdfa48c413..668f14234459 100644 > --- a/include/drm/drm_bridge.h > +++ b/include/drm/drm_bridge.h > @@ -136,6 +136,9 @@ struct drm_bridge_funcs { > * > * NOTE: > * > + * This is deprecated, do not use! > + * New drivers shall use &drm_bridge_funcs.atomic_check. > + * > * This function is called in the check phase of atomic modesets, which > * can be aborted for any reason (including on userspace's request to > * just check whether a configuration would be possible). Drivers MUST -- Regards, Laurent Pinchart