From patchwork Tue Apr 13 09:48:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199905 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=-16.5 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,USER_AGENT_GIT 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 8FA53C433ED for ; Tue, 13 Apr 2021 09:49: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 96E65613A9 for ; Tue, 13 Apr 2021 09:49:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96E65613A9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3331489B96; Tue, 13 Apr 2021 09:49:12 +0000 (UTC) Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFE3389B96 for ; Tue, 13 Apr 2021 09:49:11 +0000 (UTC) Received: by mail-wr1-x42f.google.com with SMTP id w4so12034173wrt.5 for ; Tue, 13 Apr 2021 02:49:11 -0700 (PDT) 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=w7ucKXrJnIzMOthJlOHj471QYeurlAAFSPpADM6ZH3I=; b=lHZKFi8p2s2gQf3z6OTx8EPk7FhTUspBjLx0lknmL9wPZ/OK0T9ykLVrdVBredNgtd RUXjoCF0oDM3Fcm1gbcBCK3YyntijYmvKJQHS1LmpYEZoxlM3p2guhVKo7I6yLGbRYwO YmmMkB3UZ3jDJCnOcLxAD18bU7jItd2NRDhdE= 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=w7ucKXrJnIzMOthJlOHj471QYeurlAAFSPpADM6ZH3I=; b=uoQ/BV2ZvaNBBmiDaP7xciVmK/YfUGQ2a4VApJ1e3FBmSUpsJXN/B6B/RfWFn98WSz tlokFaU13qUflTtq7X5ulrWEMoT9nTHH0LZp/G2YmkQrfHadd2zK0Xa+F61C0bE9xwGA Eq4XHpzjdOifsvRi+DexgAOx67Sj1p+PAc0yIe6OpdaW+H4rSez+hISHw6tSs4ykJc3T e4VSM2J+urR3fCNI+JhPgAOAyLaPHMfBQJkbJWNrl4DMb7Oq4SSdN10YZEMDNFjxHyxS nPJI/FXb6QVBuIc9i/evF4eH/ih1WPODGVZnCFFl9KZOsk6JYmbzAZAJe4DxkXsCmrLU oXdw== X-Gm-Message-State: AOAM532EjUafCJC0wLMYrSlLQ2jXibj5khyffZuGBdsUbBWjed8wNARr 07YgpQd7UnK0eVvGk5D4vI8pOg== X-Google-Smtp-Source: ABdhPJyNLLLWdmsj1IxqYWpBcGq07B4aRAR8sF7LBNNc6mpuO6LExejBrYGHG/1qTAx9/nQJk+b2Cg== X-Received: by 2002:a5d:658c:: with SMTP id q12mr35540551wru.30.1618307350470; Tue, 13 Apr 2021 02:49:10 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:09 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:48:52 +0200 Message-Id: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 01/12] drm/arm: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics Development , "James \(Qian\) Wang" , Daniel Vetter , Mihail Atanassov Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here for both komeda and malidp. Signed-off-by: Daniel Vetter Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Brian Starkey --- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 1 - drivers/gpu/drm/arm/malidp_drv.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c index aeda4e5ec4f4..ff45f23f3d56 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c @@ -247,7 +247,6 @@ static void komeda_kms_mode_config_init(struct komeda_kms_dev *kms, config->min_height = 0; config->max_width = 4096; config->max_height = 4096; - config->allow_fb_modifiers = true; config->funcs = &komeda_mode_config_funcs; config->helper_private = &komeda_mode_config_helpers; diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index d83c7366b348..de59f3302516 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -403,7 +403,6 @@ static int malidp_init(struct drm_device *drm) drm->mode_config.max_height = hwdev->max_line_size; drm->mode_config.funcs = &malidp_mode_config_funcs; drm->mode_config.helper_private = &malidp_mode_config_helpers; - drm->mode_config.allow_fb_modifiers = true; ret = malidp_crtc_init(drm); if (ret) From patchwork Tue Apr 13 09:48:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199907 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=-16.5 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,USER_AGENT_GIT 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 4943BC433B4 for ; Tue, 13 Apr 2021 09:49:18 +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 CE911613A9 for ; Tue, 13 Apr 2021 09:49:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE911613A9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 88EB589BFE; Tue, 13 Apr 2021 09:49:13 +0000 (UTC) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by gabe.freedesktop.org (Postfix) with ESMTPS id A885C89BAC for ; Tue, 13 Apr 2021 09:49:12 +0000 (UTC) Received: by mail-wm1-x333.google.com with SMTP id t5-20020a1c77050000b029010e62cea9deso8419628wmi.0 for ; Tue, 13 Apr 2021 02:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CGUka0sVW6wFNgc+ztoFeb2OUOiG/y4ojkNNplTLBt0=; b=fTO0Jx2vcmvQdLCXa8mhtAyXJVZEw/1VEXCGgr6kv8NHXjtswWDbLwl6sGbwuihz5L R9Fmq4p4wiuGl6SHTg0UW14WvKyh4/kLpXFh6bBAW6fUG50BX+Q8Fe9UT7PVdn2Dt8pc 3KhNvwFs40NEccqchivj/VRWro8cT6y+TYwOY= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=CGUka0sVW6wFNgc+ztoFeb2OUOiG/y4ojkNNplTLBt0=; b=TvD1kAqC5UiKn8HFv7PQ33IqRq7qL0VAdSouJfR8oMNEHsRxRc1daWbeLtDQBm5RTE pE/+hcnPcv+UwNnQwHccYSkx3pShNawEtLq6kecRZBZyhU4LZYmGqf4FABtPFbE22xko 4/sPLB0Kzxj8cn8PvAoX8706/tAowYLA09iMQOz8Io4js4hmThsya2XVAqLgrsd5ApLP PMc2+J7S1pVhQnOr6bqz4qNGFJgKrvIQ3au1SUcuIdQ0v/+1TUZYz69renZ/seNZwbCw 4l26hG/atJ6+U7T+Aiz+7QKA+VbhiQwjl9bdwyZh6kQFZMjFVnIGN26a/GxY5zvj+PwI QoMQ== X-Gm-Message-State: AOAM533UY+ACS7gVeefUJBlm+HrcM+HdGZ9YQpuSoDoEd6Nr+ZigJFnZ LkudVql/Af7BP/oti11h3JQAdg== X-Google-Smtp-Source: ABdhPJyDTagvp8Qr2MQeGN0Zbd+8hK2Pfwgv5a7NUG9u4fFQRmiEsT/K2Z4xwD3MJUyxJxiLf6KpmQ== X-Received: by 2002:a1c:5454:: with SMTP id p20mr3305623wmi.187.1618307351369; Tue, 13 Apr 2021 02:49:11 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:10 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:48:53 +0200 Message-Id: <20210413094904.3736372-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 02/12] drm/arm/malidp: Always list modifiers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Daniel Vetter , Intel Graphics Development , stable@vger.kernel.org, Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Even when all we support is linear, make that explicit. Otherwise the uapi is rather confusing. Cc: stable@vger.kernel.org Cc: Pekka Paalanen Cc: Liviu Dudau Cc: Brian Starkey Signed-off-by: Daniel Vetter --- drivers/gpu/drm/arm/malidp_planes.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index ddbba67f0283..8c2ab3d653b7 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -927,6 +927,11 @@ static const struct drm_plane_helper_funcs malidp_de_plane_helper_funcs = { .atomic_disable = malidp_de_plane_disable, }; +static const uint64_t linear_only_modifiers[] = { + DRM_FORMAT_MOD_LINEAR, + DRM_FORMAT_MOD_INVALID +}; + int malidp_de_planes_init(struct drm_device *drm) { struct malidp_drm *malidp = drm->dev_private; @@ -990,8 +995,8 @@ int malidp_de_planes_init(struct drm_device *drm) */ ret = drm_universal_plane_init(drm, &plane->base, crtcs, &malidp_de_plane_funcs, formats, n, - (id == DE_SMART) ? NULL : modifiers, plane_type, - NULL); + (id == DE_SMART) ? linear_only_modifiers : modifiers, + plane_type, NULL); if (ret < 0) goto cleanup; From patchwork Tue Apr 13 09:48:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199909 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=-16.5 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,USER_AGENT_GIT 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 5F96AC433B4 for ; Tue, 13 Apr 2021 09:49:22 +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 1EBB3613B6 for ; Tue, 13 Apr 2021 09:49:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EBB3613B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F320789C3F; Tue, 13 Apr 2021 09:49:14 +0000 (UTC) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E70689F06 for ; Tue, 13 Apr 2021 09:49:13 +0000 (UTC) Received: by mail-wm1-x336.google.com with SMTP id p19so8378999wmq.1 for ; Tue, 13 Apr 2021 02:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sKnMGdydD5VEI/3ScWh7YccdRp5+79GpsyoCcHVvPso=; b=Eyfyf4WshcsgJkQdPXBY9ti7ylJWX7Sk6dR7sdNRN5pkI8INb22SYQZrIgOMYf5JCm jNLHnN+7X8x6jEzvvDwSCmjDxnpYgVws43xT6fX8qQa58NgzjQ5s3rUtfYaGLve9OCCe whEAQdW2j8M+s7h43+LSaWFRFh/jAMMBBAE+g= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=sKnMGdydD5VEI/3ScWh7YccdRp5+79GpsyoCcHVvPso=; b=bvchyBWmVv20Y09mH/RJMOdNTKkWMv2y1IbUwdKxkJBNS/3B0AtttbEPqnBAlyHPRz QigeGJuR8uKaxy7CNDFq3pbKaCNxcNMx8g3sSFrDh+4N3n5RMdjLoZgyTTVnIkotoYjT rhHuBzcdFBr1OBAyVbjYNC8FQvsyVFzK9tZ/6MBjFFE2Aw2VipSBTmxnnMl4CiwlqGyN WrA28f6hOibUz4II2y2xAnZqo7zQB/O7xX8ebgSHYKjJZEwqkJCGmMz8VnS/6irpRCVA xvFKcpW0UmEjwZnXpnIfDpkwE2MKtmrS3U8oY3LlQhbNDkD/pSpa6asr6Fh69IJ3+kX0 aQBA== X-Gm-Message-State: AOAM531D5e2YBDYVfMD+WlP6bfsT5knYzm6fiqjXWen0SelKL+OIRYFE KTiV7nPh5uR8e1O4RGItGgJwNg== X-Google-Smtp-Source: ABdhPJyozmtYCr5fQuYQk3xh8oRysWRoKgt+zOj2WPFRCcwMWqB8klX4kzPMoSUp1bby3DGm803+ZA== X-Received: by 2002:a05:600c:3546:: with SMTP id i6mr3218307wmq.104.1618307352372; Tue, 13 Apr 2021 02:49:12 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:11 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:48:54 +0200 Message-Id: <20210413094904.3736372-3-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 03/12] drm/exynos: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Joonyoung Shim , Daniel Vetter , Intel Graphics Development , Seung-Woo Kim , Krzysztof Kozlowski , Inki Dae , Kyungmin Park , Daniel Vetter , linux-arm-kernel@lists.infradead.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Signed-off-by: Daniel Vetter Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Acked-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c index 64370b634cca..79fa3649185c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c @@ -177,7 +177,5 @@ void exynos_drm_mode_config_init(struct drm_device *dev) dev->mode_config.funcs = &exynos_drm_mode_config_funcs; dev->mode_config.helper_private = &exynos_drm_mode_config_helpers; - dev->mode_config.allow_fb_modifiers = true; - dev->mode_config.normalize_zpos = true; } From patchwork Tue Apr 13 09:48:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199911 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=-16.5 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,USER_AGENT_GIT 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 A4BD0C43460 for ; Tue, 13 Apr 2021 09:49:23 +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 73D5A613B6 for ; Tue, 13 Apr 2021 09:49:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73D5A613B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E698E6E24E; Tue, 13 Apr 2021 09:49:15 +0000 (UTC) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by gabe.freedesktop.org (Postfix) with ESMTPS id 928C089C3F for ; Tue, 13 Apr 2021 09:49:14 +0000 (UTC) Received: by mail-wm1-x336.google.com with SMTP id u5-20020a7bcb050000b029010e9316b9d5so8397283wmj.2 for ; Tue, 13 Apr 2021 02:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=adyH3SPpnboMOl3tkCszQtpvrgJSywQm0ZH8RlH4qpQ=; b=e8UhRrLqNTUrFPuMFAXUBvVteWBxdOrRbJeCAHWhnEL6Wrkt8PoRymRYQcfBSungG7 OpzJx737ywzd6HMAPXT7ahprk31KhCmLyfCYLI5nlahCGHhaFVVLdMjSEolVBbzX/xCY 4ZZ7MUOp/CfF9RlkOwYZuPw8cYfJ815yOhhew= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=adyH3SPpnboMOl3tkCszQtpvrgJSywQm0ZH8RlH4qpQ=; b=dUximwCSira0FgicNb7aYIViGerr7e4WX2w3jWzG67mxWYKjtwPCYseySone18nrJr u4tCjd2/hAdnDsZ9a9DKJ4V725tlTSnTuVJCHvxQU4SqVYQq/Ej/QDyBDl+MKdHgarHK 6EdnAkHzSUxukXnmYaTWs2Ave0AXpBLXwaoUS8piFId5XQD0B33qz5Um2+9CuP2KXXDm VwBLszL2yicLemLgY6lAYtYkNKKb1JpoxYvk5qO/hd5jHDPtsWvgzn3TEGFQwaIQjeHk GfZpnYN71Z727kr71uGzb9BV7M67530oUkiG0FUCRXywbI4vWtjSwZ1gXX8LaAvy3FLi TaOQ== X-Gm-Message-State: AOAM531M1aF/ZjgiHa2Yehuz60Xdhs8rUaNwER+h16IQPNIsnC7rRZPE uQOTn4OX7QqSlQn+EM3ximOPsg== X-Google-Smtp-Source: ABdhPJxxNj5eWGHzgr0XAqGc6CAkLj9GwU3yqOYuaNmpFWO3dyqAkaFWnToV5HyZBbziVYNBAXDf0Q== X-Received: by 2002:a1c:3182:: with SMTP id x124mr3243309wmx.41.1618307353370; Tue, 13 Apr 2021 02:49:13 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:12 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:48:55 +0200 Message-Id: <20210413094904.3736372-4-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 04/12] drm/i915: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Daniel Vetter , Intel Graphics Development , Chris Wilson , Dave Airlie , Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Signed-off-by: Daniel Vetter Cc: "Ville Syrjälä" Cc: Manasi Navare Cc: Jani Nikula Cc: "José Roberto de Souza" Cc: Chris Wilson Cc: Imre Deak Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Karthik B S Cc: Matt Roper --- drivers/gpu/drm/i915/display/intel_display.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index de8546a46872..2d1aa35adb0a 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -11732,8 +11732,6 @@ static void intel_mode_config_init(struct drm_i915_private *i915) mode_config->preferred_depth = 24; mode_config->prefer_shadow = 1; - mode_config->allow_fb_modifiers = true; - mode_config->funcs = &intel_mode_funcs; mode_config->async_page_flip = has_async_flips(i915); From patchwork Tue Apr 13 09:48:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199913 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=-16.5 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,USER_AGENT_GIT 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 A9EA0C43460 for ; Tue, 13 Apr 2021 09:49:28 +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 76A3D613A9 for ; Tue, 13 Apr 2021 09:49:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76A3D613A9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AEB396E2DF; Tue, 13 Apr 2021 09:49:16 +0000 (UTC) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7A0C26E24E for ; Tue, 13 Apr 2021 09:49:15 +0000 (UTC) Received: by mail-wm1-x32c.google.com with SMTP id g18-20020a7bc4d20000b0290116042cfdd8so10291146wmk.4 for ; Tue, 13 Apr 2021 02:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kflxSBqLQaPPRJYxvd/LNnDO2sK1GIdN9i+UPGrUqpQ=; b=lOs4ZUh4aFlEAaDuPradkJytOePPNKjsnB5l9JuSEDrjMBvEpASLZ6BFMnpndw7Y8y AamCWbb+JylQb+6X4NPZiuNpPGuS6PXOcWmZxn05iqyA+suNvol8MLHwF84wMeVLilmK q74N8RB2VZC8JUEJ7Zbtqur750OzSJz7Bdn6Q= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=kflxSBqLQaPPRJYxvd/LNnDO2sK1GIdN9i+UPGrUqpQ=; b=nYXVdgnUzd3zb9ZVfjzEUbLffuHHAZF4eAStuNTm6CjxB8BnuZCHBkISTKu4SyrzzC 2mc/r+reLqgZZZbv1BgrlQXwzKPpxyn2Px2otDFUg+sWdx+2E8L0ENr0sSiZzmBDsxdm NTJs9UCWoEBHFbU5I4oEzVv8SWK68FsEvSbCW2NIgxoc+8MW3Xh9vGAvWZRhKDEjTSYD 7mPb7eZacs07RVZyOPloo0kFrOyQGPmwUsAyEzdzKTqq882tSaZrkT/nUqMMHIPF3T74 oIdStyXUkOYNqI3eb0YHmRRZT0+IumCfqTersYUqJkfNKv++M/1lvkNggW5IAnWkGh6N clNw== X-Gm-Message-State: AOAM5326v44fOgJZWNZkBxJiBnvkw7vv4Fahwde2zYMJOWxjAfMvl2MS S5EIlMQ+cQfmO+Whqm1zkwGL2jv+EtH8rA== X-Google-Smtp-Source: ABdhPJwJSGRymhGmSzjJLWTzNCtPih2XjXM79SNIHdkr/3jbietkqqwhLRz8rdVTpcUEryV7iJRfyQ== X-Received: by 2002:a05:600c:3594:: with SMTP id p20mr3115175wmq.173.1618307354288; Tue, 13 Apr 2021 02:49:14 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:13 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:48:56 +0200 Message-Id: <20210413094904.3736372-5-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 05/12] drm/imx: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Pengutronix Kernel Team , Daniel Vetter , Intel Graphics Development , NXP Linux Team , Philipp Zabel , Daniel Vetter , Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. This one actually set it twice on top of what drm_plane_init does, so double-redundant! Signed-off-by: Daniel Vetter Cc: Philipp Zabel Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Lucas Stach --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 1 - drivers/gpu/drm/imx/imx-drm-core.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c index b549ce5e7607..37ae68a7fba5 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-kms.c +++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c @@ -52,7 +52,6 @@ static void dcss_kms_mode_config_init(struct dcss_kms_dev *kms) config->min_height = 1; config->max_width = 4096; config->max_height = 4096; - config->allow_fb_modifiers = true; config->normalize_zpos = true; config->funcs = &dcss_drm_mode_config_funcs; diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 2ded8e4f32d0..8be4edaec958 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -209,7 +209,6 @@ static int imx_drm_bind(struct device *dev) drm->mode_config.max_height = 4096; drm->mode_config.funcs = &imx_drm_mode_config_funcs; drm->mode_config.helper_private = &imx_drm_mode_config_helpers; - drm->mode_config.allow_fb_modifiers = true; drm->mode_config.normalize_zpos = true; ret = drmm_mode_config_init(drm); From patchwork Tue Apr 13 09:48:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199915 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=-16.5 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,USER_AGENT_GIT autolearn=unavailable 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 19403C433B4 for ; Tue, 13 Apr 2021 09:49:34 +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 D896E613AB for ; Tue, 13 Apr 2021 09:49:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D896E613AB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 23F316E2E1; Tue, 13 Apr 2021 09:49:19 +0000 (UTC) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by gabe.freedesktop.org (Postfix) with ESMTPS id ECD116E2E1 for ; Tue, 13 Apr 2021 09:49:16 +0000 (UTC) Received: by mail-wm1-x32f.google.com with SMTP id g66-20020a1c39450000b0290125d187ba22so7967323wma.2 for ; Tue, 13 Apr 2021 02:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yPW4RMlVJqBgs+Y7G8gEXGQ1RwDF+YDhbYujBtNiMB4=; b=EeswGHCTt6/hIr1+hlfQJ/4oAug1M+x2sY1qTJfTHkcAMVF+6bldjGP/1cXTWPOLQf lwIinEHpub8bI2J9KsucdEbt+TjNaU+c3sSHaD7hUobwTtJLbq5IX+lKsFHzdAIiMQB8 BSOxqlug3I9fTfhzXpSZazgsaCpVjK0vEzkjU= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=yPW4RMlVJqBgs+Y7G8gEXGQ1RwDF+YDhbYujBtNiMB4=; b=OiYlA3VtfvtmVM9ONjCyN+reW5e9NAmpAID/vPaaht2utvM1e2wmXIAzGrwHtzgSvs VeOhr53TH44YQQ6e+hdIrxEBF9Crvwawa0tPUeUxSEI4GH3sBoZywYK++vZK4vrv72hn SoLUYCUuINihgLLEBc/HjanTP26yp3zLybaXJBOpURHZLfXkZOYL+9YOrVg8ERXT+2CD y9K0Pk84gB5Gsj8Di8jn0CWrIauftJJwIknoh7IQFGTjjo8DsTdpHL67+IyckaNdM9I5 aqSuaP3YEI+gQM35VRHW+R+0YpFa9GRUL/btrg+1PNl/YRUJahlvqyuX7C/+l+UhzA6S nBoA== X-Gm-Message-State: AOAM533MRk5MLCzNhr20BcgJEZB7+yozpXmY4207k80sqZXmepzsSvk2 GkAuzb2GqFpELW/w50+rv2BiLFMWE8IYHQ== X-Google-Smtp-Source: ABdhPJw2X6yP0YOFBN7whchfsfARonndlK1L4HNUpw+LleV1vf7SPmNeSXysI8ZaKF82Yg7qIeasrQ== X-Received: by 2002:a1c:1f8e:: with SMTP id f136mr3273162wmf.17.1618307355687; Tue, 13 Apr 2021 02:49:15 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:14 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:48:57 +0200 Message-Id: <20210413094904.3736372-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 06/12] drm/msm/dpu1: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Rajendra Nayak , Daniel Vetter , Intel Graphics Development , Tanmay Shah , Jordan Crouse , Eric Anholt , Qinglang Miao , Daniel Vetter , Jeykumar Sankaran , Kalyan Thota Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: Kalyan Thota Cc: Jordan Crouse Cc: Eric Anholt Cc: Tanmay Shah Cc: Rajendra Nayak Cc: Jeykumar Sankaran Cc: Qinglang Miao --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 85f2c3564c96..074fb37ed49f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -1020,11 +1020,6 @@ static int dpu_kms_hw_init(struct msm_kms *kms) dpu_kms->catalog->caps->max_mixer_width * 2; dev->mode_config.max_height = 4096; - /* - * Support format modifiers for compression etc. - */ - dev->mode_config.allow_fb_modifiers = true; - /* * _dpu_kms_drm_obj_init should create the DRM related objects * i.e. CRTCs, planes, encoders, connectors and so forth From patchwork Tue Apr 13 09:48:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199917 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=-16.5 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,USER_AGENT_GIT autolearn=unavailable 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 95A30C43460 for ; Tue, 13 Apr 2021 09:49:34 +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 612B4613BF for ; Tue, 13 Apr 2021 09:49:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 612B4613BF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 63C0E6E2E3; Tue, 13 Apr 2021 09:49:19 +0000 (UTC) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEB646E311 for ; Tue, 13 Apr 2021 09:49:17 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id x7so15751479wrw.10 for ; Tue, 13 Apr 2021 02:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m56BVCqfwfl5q0jPz4hzEYoV7UdZ/KST4hTQZTeuJdk=; b=DlN1qLsRkwspcoQjZHLlkmJmsRzvKA8b3BZx7Ij6a/J7hK2lxohgdq1Lz5WwmRyTiE y6Ijp9eFpL0gR/XBxFlrkxHCmsQwwjvuCMxIOp8ENOpy+NzljtuXoYaxd7OhmAbgFpO+ sQ+G3DQE4yzJhVm18ZYYkeig9SX6t1+hOv+3A= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=m56BVCqfwfl5q0jPz4hzEYoV7UdZ/KST4hTQZTeuJdk=; b=jr71Fbj/yIqUD5G0IGP4WQcoNEUIHvKbRFjMdCdQiH1WaD3s5zOL7hdXWxPIdR1NwS UEJZFsbXI4aMIeCdNbZJic3pDHxC7OQuBuCuuiXWuUrpy8XEIa5q1Yi1JOGrFE9R/PoR ld+AcC8h81lSkzHa4/2W2ST/GnavgEOKFlGUh8JSfNXqGim+vBeci1yLcOgm8+GDEwKX 7fyDdaRkF9OTksiDgtRaKUoFunMsvkfPkHjkIve/TG8zQ+PqNXEuAs7z9Ls2Q2LGv5ew PWlrttL0P7XvjpWEAaRs2g9W7ZN5eHFwqzsxHWUDI+0AF9WTfGzICDKJIgRwbMr379e+ +Jsg== X-Gm-Message-State: AOAM531h3MTHc6ZNty/n5pq3N8+st8Lc5sVN5X9koUtBgvRZI412PdpF 8jPbplRtx9Fc8D/wgRagxhz1rg== X-Google-Smtp-Source: ABdhPJxba/UokgDDBGd45GnkdAsegWSdlxRgWh5ae6CT+UZ1J8D7VSV+2k5yG+VDZ5PL+WaH+ETJ/Q== X-Received: by 2002:a5d:6684:: with SMTP id l4mr35724697wru.381.1618307356600; Tue, 13 Apr 2021 02:49:16 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:16 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:48:58 +0200 Message-Id: <20210413094904.3736372-7-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 07/12] drm/msm/mdp4: Fix modifier support enabling X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Pekka Paalanen , Daniel Vetter , Intel Graphics Development , stable@vger.kernel.org, Jordan Crouse , Daniel Vetter , Sam Ravnborg , Emil Velikov Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Setting the cap without the modifier list is very confusing to userspace. Fix that by listing the ones we support explicitly. Stable backport so that userspace can rely on this working in a reasonable way, i.e. that the cap set implies IN_FORMATS is available. Cc: stable@vger.kernel.org Cc: Pekka Paalanen Cc: Rob Clark Cc: Jordan Crouse Cc: Emil Velikov Cc: Sam Ravnborg Signed-off-by: Daniel Vetter --- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 -- drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c index 3d729270bde1..4a5b518288b0 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c @@ -88,8 +88,6 @@ static int mdp4_hw_init(struct msm_kms *kms) if (mdp4_kms->rev > 1) mdp4_write(mdp4_kms, REG_MDP4_RESET_STATUS, 1); - dev->mode_config.allow_fb_modifiers = true; - out: pm_runtime_put_sync(dev->dev); diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c index 9aecca919f24..49bdabea8ed5 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c @@ -349,6 +349,12 @@ enum mdp4_pipe mdp4_plane_pipe(struct drm_plane *plane) return mdp4_plane->pipe; } +static const uint64_t supported_format_modifiers[] = { + DRM_FORMAT_MOD_SAMSUNG_64_32_TILE, + DRM_FORMAT_MOD_LINEAR, + DRM_FORMAT_MOD_INVALID +}; + /* initialize plane */ struct drm_plane *mdp4_plane_init(struct drm_device *dev, enum mdp4_pipe pipe_id, bool private_plane) @@ -377,7 +383,7 @@ struct drm_plane *mdp4_plane_init(struct drm_device *dev, type = private_plane ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; ret = drm_universal_plane_init(dev, plane, 0xff, &mdp4_plane_funcs, mdp4_plane->formats, mdp4_plane->nformats, - NULL, type, NULL); + supported_format_modifiers, type, NULL); if (ret) goto fail; From patchwork Tue Apr 13 09:48:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199919 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=-16.5 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,USER_AGENT_GIT 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 32A40C43462 for ; Tue, 13 Apr 2021 09:49:35 +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 ED708613B8 for ; Tue, 13 Apr 2021 09:49:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED708613B8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E56586E334; Tue, 13 Apr 2021 09:49:19 +0000 (UTC) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by gabe.freedesktop.org (Postfix) with ESMTPS id CBBD66E2E3 for ; Tue, 13 Apr 2021 09:49:18 +0000 (UTC) Received: by mail-wr1-x430.google.com with SMTP id a6so15784628wrw.8 for ; Tue, 13 Apr 2021 02:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KOCIo0GxcuBFJ7MAFxsDsYBoZyOhVlSKHbo+qwITV5Q=; b=adN7hP+T0iNVXfFXZvSvgr+93E9K98/BtliqF90MH8R8o5FKRtDJItG5KKbuc4MYMe qWK/ti+Hc73ReMOF1oIb5bn0cRI5vWpR+7N32rqQp4F42mweFWw9zjUMLl9kWoBC0RcG wxR9XZDiqN0RFaXyrUK1NIeHoIMwzwAMXoYoI= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=KOCIo0GxcuBFJ7MAFxsDsYBoZyOhVlSKHbo+qwITV5Q=; b=jz0LTOuhfQMuyX2zZQZBQmiTbMJp6d9LjUweOlNtjCITvbCQAjVlq48L0D06Iga2lx p9mV0InZbD04pf4h1Zu6SJ6bpWRioP+TTsr4WLyG6jC/EDKvjGPptFFbp5Ls0fsyrj+i DCKpKhdeymakx6hb8Uanb6/cU4o6iyjvGEFJwRcnfBhPJU1+b+bOCepQ08gBr6V39xlj I2UUHgynbJE+1X52BJufp3pdDa7EpO+6L+iD3KhzJ5Il/AjwWQaLVmkNW2IzwEHFrxdk /ABWe9sN9HYgyqQZVvxGx0bh1ze6FcVZoo7isLdfFMMBRZrPdezwKQhcr/9ZdZtjJLP3 o+4w== X-Gm-Message-State: AOAM533DQonM/57LuPAdmF351em0E9jukXSPxjfaGM484YJs0k6wfuz/ 8xHac6aZvZtzgJ7EA9bJpS/m/g== X-Google-Smtp-Source: ABdhPJzuwM6zgnq1ioNXEfS/WwdqokduH0KbRvUyJrFDtNqmDFhRlSCyaOxnBcCKHkMTz2CRCLLbEg== X-Received: by 2002:a05:6000:1004:: with SMTP id a4mr34540971wrx.202.1618307357555; Tue, 13 Apr 2021 02:49:17 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:17 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:48:59 +0200 Message-Id: <20210413094904.3736372-8-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 08/12] drm/nouveau: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Daniel Vetter , Intel Graphics Development , stable@vger.kernel.org, Ben Skeggs , nouveau@lists.freedesktop.org, Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Note that this fixes an inconsistency: We've set the cap everywhere, but only nv50+ supports modifiers. Hence cc stable, but not further back then the patch from Paul. Cc: stable@vger.kernel.org # v5.1 + Cc: Pekka Paalanen Signed-off-by: Daniel Vetter Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org --- drivers/gpu/drm/nouveau/nouveau_display.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 14101bd2a0ff..929de41c281f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -697,7 +697,6 @@ nouveau_display_create(struct drm_device *dev) dev->mode_config.preferred_depth = 24; dev->mode_config.prefer_shadow = 1; - dev->mode_config.allow_fb_modifiers = true; if (drm->client.device.info.chipset < 0x11) dev->mode_config.async_page_flip = false; From patchwork Tue Apr 13 09:49:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199921 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=-16.5 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,USER_AGENT_GIT 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 AEFF6C43460 for ; Tue, 13 Apr 2021 09:49:37 +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 79CB2613A9 for ; Tue, 13 Apr 2021 09:49:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79CB2613A9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE6946E3D6; Tue, 13 Apr 2021 09:49:21 +0000 (UTC) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by gabe.freedesktop.org (Postfix) with ESMTPS id C1D526E2ED for ; Tue, 13 Apr 2021 09:49:19 +0000 (UTC) Received: by mail-wr1-x42c.google.com with SMTP id e7so6808778wrs.11 for ; Tue, 13 Apr 2021 02:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5/VCtoETMmUzL0vMPqbtcoUDD2y2ltfbzTlgLqC6ZdU=; b=BRRd8qbtTFGYEMdRV5HexTZXmoRkVYk8JiyfN7BdyhztQs/RDa754NvDDd2qaxbN8U DUWmf96W1+eX9ioCfQNqH//U3DZEaHBT4N/+sGgxpgWhazVlP6RJBuaqEj6TztkURr04 NJXk2wKPT930X8RRnXr25PPTXiO/eMJ+BuGck= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=5/VCtoETMmUzL0vMPqbtcoUDD2y2ltfbzTlgLqC6ZdU=; b=XUWLMxRs0Ql6XkQYOyqxOZ808NI9IacCfcBA5PVZcXR7665GL+ApMcFAnOHS5rGoP+ fk/2o1c8x5tnjr3cg/tOkUeBkIGBF2TKXF+iaXp07SObynCJkmrs2Mg2BesN9QKut+Fs DjtAQk9EKPRvTW2yBkJRQhvejMA8AHr6wNkUb4q8BWs0iVDR0NFhPJY2RXKDggKd/dtj eb0pK/CFq+gSukGUFc+1Tb742g+K01uPgL0ecw5zmRhnIvbqEdtlgLIxi5DSwtl7JJCZ Aj77pb8u1QitnIIuWT+VlaGaEH0iJBnZ7pb0NGLgfKbpu4XBP/aEhpSZRUWutLHPl231 pWBg== X-Gm-Message-State: AOAM531ti4qFcydhHtFeP87hcvGDqaZjBsW/mk9wybzTaSRBILon7C1k 42MO/decm9ZX7tcTEo3bLeoqoQ== X-Google-Smtp-Source: ABdhPJw1GFAzXcytfZXNu9CcACpZoWl3EZWaSegc/mUkmbt0A5hEw3xdPxj85E3UJSo3NsC8wcDNLA== X-Received: by 2002:a05:6000:83:: with SMTP id m3mr34903882wrx.321.1618307358507; Tue, 13 Apr 2021 02:49:18 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:18 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:49:00 +0200 Message-Id: <20210413094904.3736372-9-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 09/12] drm/stm: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Coquelin , Daniel Vetter , Intel Graphics Development , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com, Philippe Cornu , Benjamin Gaignard , Daniel Vetter , Yannick Fertre , linux-arm-kernel@lists.infradead.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Signed-off-by: Daniel Vetter Cc: Yannick Fertre Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org --- drivers/gpu/drm/stm/ltdc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 65c3c79ad1d5..e99771b947b6 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -1326,8 +1326,6 @@ int ltdc_load(struct drm_device *ddev) goto err; } - ddev->mode_config.allow_fb_modifiers = true; - ret = ltdc_crtc_init(ddev, crtc); if (ret) { DRM_ERROR("Failed to init crtc\n"); From patchwork Tue Apr 13 09:49:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199923 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=-16.5 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,USER_AGENT_GIT autolearn=unavailable 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 7CC11C433ED for ; Tue, 13 Apr 2021 09:49:39 +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 41579613BA for ; Tue, 13 Apr 2021 09:49:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41579613BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D7266E311; Tue, 13 Apr 2021 09:49:22 +0000 (UTC) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by gabe.freedesktop.org (Postfix) with ESMTPS id C58286E364 for ; Tue, 13 Apr 2021 09:49:20 +0000 (UTC) Received: by mail-wr1-x42e.google.com with SMTP id w4so12034669wrt.5 for ; Tue, 13 Apr 2021 02:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mwq8zywA+ypXJGwthk+aWxfXnXK//R2FzCHadrl6w7g=; b=RPn10Dkle43eKRGbKP8CCEtMoeX3/n5uj11U8rGkJzvHD1odfR7oGBMV5XGkJLeKPb Zo+oNt4m2664SlNFGxo82FN9Bu22db7GwixB7BL73y3xlMj7QS1DaVFEZtPcHS+IWaJF K1/adg7uet8ndzAelP4fG3upxsd1CAyZSwvIw= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=mwq8zywA+ypXJGwthk+aWxfXnXK//R2FzCHadrl6w7g=; b=YN937DiY5+SNXoDK8pqx3QPaYLJIUs4sVCm34wT4e0KU5i9wik5CDy7FDjKT96jjup rIumRonEg3irNPybgf8Wb3h4U0F2i4B3vVoS9CHEyoX2uejSUkDTLC8C68mOsmKch0zi lfQ5s2fRwlf5w9QSQpt4TQLFemu9cAPEPd6EX5pdRnKY8Us5dUIRxMMjRj8/Kp6eN2ql D/iofzku5eyWEBj8uFy5DgBJYkKFBzyce1YuBy97J9vKVHBM4tVYvGx5aM8b/ept7p5O Mk9AG9SMuNa+/He9b9KyAeU/pZkHTPHO2etfd8gIKyteu9Fowae/v6GUSb7KK/gEnVHh 8w/A== X-Gm-Message-State: AOAM530YUPqSxiiMG/dZ09GQODhIr7Esx6AtRWRT79kFn5TMUZn5oq63 q39QN44Ho4vNWeaGITbncfohIA== X-Google-Smtp-Source: ABdhPJxlTrqiBskCjnzrlr2lzj0MoFiML8UzDvveT5cKCCW6RRg7VDInyaCrnkCtopcD1uIeUnQD0g== X-Received: by 2002:a5d:6145:: with SMTP id y5mr27967739wrt.27.1618307359464; Tue, 13 Apr 2021 02:49:19 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:19 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:49:01 +0200 Message-Id: <20210413094904.3736372-10-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 10/12] drm/tegra: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Daniel Vetter , Intel Graphics Development , stable@vger.kernel.org, Jonathan Hunter , linux-tegra@vger.kernel.org, Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. It was slightly inconsistently though, since planes with only linear modifier support haven't listed that explicitly. Fix that, and cc: stable to allow userspace to rely on this. Again don't backport further than where Paul's patch got added. Cc: stable@vger.kernel.org # v5.1 + Cc: Pekka Paalanen Signed-off-by: Daniel Vetter Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Acked-by: Thierry Reding --- drivers/gpu/drm/tegra/dc.c | 10 ++++++++-- drivers/gpu/drm/tegra/drm.c | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index c9385cfd0fc1..f9845a50f866 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -959,6 +959,11 @@ static const struct drm_plane_helper_funcs tegra_cursor_plane_helper_funcs = { .atomic_disable = tegra_cursor_atomic_disable, }; +static const uint64_t linear_modifiers[] = { + DRM_FORMAT_MOD_LINEAR, + DRM_FORMAT_MOD_INVALID +}; + static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm, struct tegra_dc *dc) { @@ -987,7 +992,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm, err = drm_universal_plane_init(drm, &plane->base, possible_crtcs, &tegra_plane_funcs, formats, - num_formats, NULL, + num_formats, linear_modifiers, DRM_PLANE_TYPE_CURSOR, NULL); if (err < 0) { kfree(plane); @@ -1106,7 +1111,8 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm, err = drm_universal_plane_init(drm, &plane->base, possible_crtcs, &tegra_plane_funcs, formats, - num_formats, NULL, type, NULL); + num_formats, linear_modifiers, + type, NULL); if (err < 0) { kfree(plane); return ERR_PTR(err); diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 90709c38c993..136fe98f9459 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -1125,8 +1125,6 @@ static int host1x_drm_probe(struct host1x_device *dev) drm->mode_config.max_width = 4096; drm->mode_config.max_height = 4096; - drm->mode_config.allow_fb_modifiers = true; - drm->mode_config.normalize_zpos = true; drm->mode_config.funcs = &tegra_drm_mode_config_funcs; From patchwork Tue Apr 13 09:49:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199925 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=-16.5 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,USER_AGENT_GIT 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 F23E4C43461 for ; Tue, 13 Apr 2021 09:49:39 +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 B6718613BA for ; Tue, 13 Apr 2021 09:49:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6718613BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9598E6E364; Tue, 13 Apr 2021 09:49:23 +0000 (UTC) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by gabe.freedesktop.org (Postfix) with ESMTPS id A84F56E3D3 for ; Tue, 13 Apr 2021 09:49:21 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id w4so12034719wrt.5 for ; Tue, 13 Apr 2021 02:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RphiA/VGkxJpy+mzsz7ElRrDbay++4IiWnsjaQ6KUhU=; b=CQFUCK69d4uUzPRiNlz8+sTbF9AYcdh9v36SA73CXTKBLhiTf3tLJU1wAe+JFdCYTn NMDkXoGpRd1G1st4QPfhEr1Kec3QATiimxyaqi2M34OUpjhzvQI5BimMuuJl+C/p9poY GSQPPGzxtvIah5oc6ccAD98MeQqn543Nf3Okg= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=RphiA/VGkxJpy+mzsz7ElRrDbay++4IiWnsjaQ6KUhU=; b=tEfVbBOhZCaChDz9Q3eED8NDTM6Ebd9SHFrldsWF0gZmHyWT2rBXQlW0jCebJf+mQ3 tkJBtTOAeoczylMezHXfoKO3uNIaMmGLI338DiZbckjwsuM5KCBDWWffFGuMIRXEGW1N xjwPIjRwEMmzbViol/0DZDjuF+rGRAdEeanaJ7QDMxXiT6IRu2UASzH5VdfB7h8RahYY Fura1pII7IT6OugnthfMGa1I19lwZXUX1cmnNfCekhZF1zXgxd3z5gER/CcM7cEzhEBq P5BUz0EVI1MPWAmVefmjhHLd1+PqR/kscSEZ9C+hc5g2rCQgaMBNMZ2jOOYAKJCgaaIy NyuQ== X-Gm-Message-State: AOAM533MmFKkN3sZf4eMA4bVqiLBbDCsyE2aHtd3EJwmq0nx6fYWQx1j VlSn3rsXriWZXZhJTKmDyraCpgmE1c4DAg== X-Google-Smtp-Source: ABdhPJyO5SI9CUDQP3JiMJYTnRrSJhQaOshEHwfla2HISVh1lugxxrxOaa4ZrLFK2fD60ExT+wqqkg== X-Received: by 2002:a5d:658c:: with SMTP id q12mr35541276wru.30.1618307360347; Tue, 13 Apr 2021 02:49:20 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:19 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:49:02 +0200 Message-Id: <20210413094904.3736372-11-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 11/12] drm/vc4: Don't set allow_fb_modifiers explicitly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Anholt , Daniel Vetter , Intel Graphics Development , Maxime Ripard , Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Signed-off-by: Daniel Vetter Cc: Eric Anholt Cc: Maxime Ripard Acked-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index bb5529a7a9c2..f29ac64a5aa5 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -899,7 +899,6 @@ int vc4_kms_load(struct drm_device *dev) dev->mode_config.helper_private = &vc4_mode_config_helpers; dev->mode_config.preferred_depth = 24; dev->mode_config.async_page_flip = true; - dev->mode_config.allow_fb_modifiers = true; ret = vc4_ctm_obj_init(vc4); if (ret) From patchwork Tue Apr 13 09:49:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12199927 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=-16.5 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,USER_AGENT_GIT 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 92054C433ED for ; Tue, 13 Apr 2021 09:49:42 +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 6221A613B6 for ; Tue, 13 Apr 2021 09:49:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6221A613B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69ADF6E3D0; Tue, 13 Apr 2021 09:49:26 +0000 (UTC) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 83A1D6E3D0 for ; Tue, 13 Apr 2021 09:49:22 +0000 (UTC) Received: by mail-wr1-x42e.google.com with SMTP id s7so15650880wru.6 for ; Tue, 13 Apr 2021 02:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PiiBhY9l8GKVCHiW/Kzeba4BFyvQWM5s+Px74+Kqx6A=; b=llN2ucEjXJPUe4ZoAX17ktZ1YyurbLL/c0YqE9jn4iBN3q9F5cUnSZN/7ZLgKEbxLx CbudF5LuDy5CwudQYKx+lPqYUzZHFvj588qMiLrZ2NcEtjqvY56L17bKbtDGvLmhG51U rxtaKWwicxSu5dA4ocv9q/Xkv1l2a5LV0ZcfU= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=PiiBhY9l8GKVCHiW/Kzeba4BFyvQWM5s+Px74+Kqx6A=; b=K12Ea1/Fq2QwUeuteEiVtMy6xZvTXmUTQrwO6kJuBTWrJt35bQdcYSHlgd80QEIH2t FciqBiJR+REhiSY5pWnAoYnwOSiPA/+2Mml04uaUiv/EwF1zh9ukNtO13bRB5MBUnDnw e38IfAmDjoW1gxogx+kpIAvbZOdnvDtCRCJIPaXfKd4ZvGtVdkpQa2vOaEQXVwzszo3H qcMRS4EEDy0T9SmeO/XnsU6KTEq4+Llgc8Rpwik9Y/sb2a4yqTFwoh02GVXI4kQIRSSR uv6w9yH2X5K/dno5NPZn7OJdpaTDw43tv6gkxSAkWujdcJeL5gMY6HR9or03jezTEkyV dCbA== X-Gm-Message-State: AOAM532Iu/frNQ9G65y/LMnQLiLXTQ1O7ZL4bzAIDDmIi0gElAW+9DpH OvbzicDUtk6K4oj9hMoeLHI9Nwe/KFiS6w== X-Google-Smtp-Source: ABdhPJzcqLtvsl0DlNnPadf6TrwC7Ar9NPXpLD8Id0MOGDIYXiRA5M4nH4wcTPhyJc/28N8y85F4ig== X-Received: by 2002:a5d:6682:: with SMTP id l2mr11515451wru.306.1618307361262; Tue, 13 Apr 2021 02:49:21 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 64sm1956458wmz.7.2021.04.13.02.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:49:20 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 13 Apr 2021 11:49:03 +0200 Message-Id: <20210413094904.3736372-12-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> References: <20210413094904.3736372-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 12/12] drm/modifiers: Enforce consistency between the cap an IN_FORMATS X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , David Airlie , Daniel Vetter , Intel Graphics Development , Maxime Ripard , Thomas Zimmermann , Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" It's very confusing for userspace to have to deal with inconsistencies here, and some drivers screwed this up a bit. Most just ommitted the format list when they meant to say that only linear modifier is allowed, but some also meant that only implied modifiers are acceptable (because actually none of the planes registered supported modifiers). Now that this is all done consistently across all drivers, document the rules and enforce it in the drm core. Cc: Pekka Paalanen Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Lucas Stach Acked-by: Maxime Ripard --- drivers/gpu/drm/drm_plane.c | 16 +++++++++++++++- include/drm/drm_mode_config.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 0dd43882fe7c..16a7e3e57f7f 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -128,6 +128,11 @@ * pairs supported by this plane. The blob is a struct * drm_format_modifier_blob. Without this property the plane doesn't * support buffers with modifiers. Userspace cannot change this property. + * + * Note that userspace can check the DRM_CAP_ADDFB2_MODIFIERS driver + * capability for general modifier support. If this flag is set then every + * plane will have the IN_FORMATS property, even when it only supports + * DRM_FORMAT_MOD_LINEAR. */ static unsigned int drm_num_planes(struct drm_device *dev) @@ -277,8 +282,14 @@ static int __drm_universal_plane_init(struct drm_device *dev, format_modifier_count++; } - if (format_modifier_count) + /* autoset the cap and check for consistency across all planes */ + if (format_modifier_count) { + WARN_ON(!config->allow_fb_modifiers && + !list_empty(&config->plane_list)); config->allow_fb_modifiers = true; + } else { + WARN_ON(config->allow_fb_modifiers); + } plane->modifier_count = format_modifier_count; plane->modifiers = kmalloc_array(format_modifier_count, @@ -360,6 +371,9 @@ static int __drm_universal_plane_init(struct drm_device *dev, * drm_universal_plane_init() to let the DRM managed resource infrastructure * take care of cleanup and deallocation. * + * Drivers supporting modifiers must set @format_modifiers on all their planes, + * even those that only support DRM_FORMAT_MOD_LINEAR. + * * Returns: * Zero on success, error code on failure. */ diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index ab424ddd7665..1ddf7783fdf7 100644 --- a/include/drm/drm_mode_config.h +++ b/include/drm/drm_mode_config.h @@ -909,6 +909,8 @@ struct drm_mode_config { * @allow_fb_modifiers: * * Whether the driver supports fb modifiers in the ADDFB2.1 ioctl call. + * Note that drivers should not set this directly, it is automatically + * set in drm_universal_plane_init(). * * IMPORTANT: *