From patchwork Fri Dec 13 17:26:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11291243 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 69CF62D34 for ; Fri, 13 Dec 2019 21:04: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 28DCF246D8 for ; Fri, 13 Dec 2019 21:04:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="cTqGuMWf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28DCF246D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 C38256E823; Fri, 13 Dec 2019 17:26:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id CA3CD6E823 for ; Fri, 13 Dec 2019 17:26:19 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id d16so235969wre.10 for ; Fri, 13 Dec 2019 09:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nGbXcqHerJGBeBzW1jOtcyX0eHMlFdu8ptwtjM6IAGs=; b=cTqGuMWf3lcXJE3yyfN1xzAVUxEAqMUALHS8265gtqOrAHneylVktnsDn3fCGXvvH8 quPYHWh7eChpHSg5CePqbwnCjBaPfj35YvykuolmaxK/EL7URUmPHMv3b9sSjm9UShC3 gs5RXerv0sB6byEH0E3f/Uim6dUPPzdW7S32c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nGbXcqHerJGBeBzW1jOtcyX0eHMlFdu8ptwtjM6IAGs=; b=itHJqtL1vXcbVqGYUVDLMVKQXvWSsPSwsRhicWa9BM7SzYiIV93IYxXuNJGAtlWPlN thU8DJdxrj5F1ZxIZk9tE1yOZn4VQbsWnNMeXhXMEWWMEljNEl4+LQNYaUDZeYm0jrbd /vY3IAfzAOhV3rcCuquP9RMuLvTofOZ0p+gttQKGVrujjSDtOG8emRBg+F4TuC/J+nJR MHArP5LwTERwvAgrKDDqTRSaFJmZkCsXZzSPl2B4vvUsv+f1kMzk4jCGlg8qBPPvFD4N BeblA+M9Jjq6teZjah6sBodjMsneovlXxGcn1zWTF6Yo0xkelmLRx1xO1rOweap2Z+q8 RDsA== X-Gm-Message-State: APjAAAVJskls4gfyjZf+i5aEJ2yWrXI6ZTVBL3sxciksG7zyWf09ZOo0 N6PI/BPV6XzO67lKcS+OSwW2HJz7Sys= X-Google-Smtp-Source: APXvYqx9y5Ex+KchS9HHfZNCLtRuFR8Lg7zSLNI3N6LTLXS7SFOtp5AZKNdobiJ13vR4HHMQZ1vA4A== X-Received: by 2002:adf:ef4e:: with SMTP id c14mr14293375wrp.142.1576257978051; Fri, 13 Dec 2019 09:26:18 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:564b:0:7567:bb67:3d7f:f863]) by smtp.gmail.com with ESMTPSA id q15sm10689669wrr.11.2019.12.13.09.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 09:26:17 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 01/10] drm/todo: Add item for the plane->atomic_check confusion Date: Fri, 13 Dec 2019 18:26:03 +0100 Message-Id: <20191213172612.1514842-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.0 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: Daniel Vetter , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It's frankly a mess, and the confusion around plane_state->crtc/fb that I fixed up in this series is the least of the problems. Add a todo as a future note of how this could be done a lot better, and with a lot less driver confusion. Signed-off-by: Daniel Vetter --- Documentation/gpu/todo.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 2d85f37284a1..63b657ecc9ce 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -72,6 +72,28 @@ Contact: Ville Syrjälä, Daniel Vetter, driver maintainers Level: Advanced +Improve plane atomic_check helpers +---------------------------------- + +Aside from the clipped coordinates right above there's a few suboptimal things +with the current helpers: + +- drm_plane_helper_funcs->atomic_check gets called for enabled or disabled + planes. At best this seems to confuse drivers, worst it means they blow up + when the plane is disabled without the CRTC. The only special handling is + resetting values in the plane state structures, which instead should be moved + into the drm_plane_funcs->atomic_duplicate_state functions. + +- Once that's done, helpers could stop calling ->atomic_check for disabled + planes. + +- Then we could go through all the drivers and remove the more-or-less confused + checks for plane_state->fb and plane_state->crtc. + +Contact: Daniel Vetter + +Level: Advanced + Convert early atomic drivers to async commit helpers ----------------------------------------------------