From patchwork Tue Apr 27 09:20:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12225697 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.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,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 B4162C433ED for ; Tue, 27 Apr 2021 09:20:27 +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 4323F613B2 for ; Tue, 27 Apr 2021 09:20:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4323F613B2 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 9DD1B6E926; Tue, 27 Apr 2021 09:20:26 +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 D7DC36E926 for ; Tue, 27 Apr 2021 09:20:25 +0000 (UTC) Received: by mail-wr1-x430.google.com with SMTP id m9so45947186wrx.3 for ; Tue, 27 Apr 2021 02:20:25 -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=Rx8JgwjlzG1e19dvcRC9VP6CH7vTVKpyfbppSfJ9X5bbePR4iAYwriFgcge939FZ4l X+0LHzQoiUvCIeUe+5ZDei2sThYvt3T8r1CDxOluJ2txvuSBzHoS2qDEbGyZZJDv4Fwx vVwyZGIegB+Q/ZM7W1I791CY18Au/BFtwB0qY= 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=rHXh8YyXI7rZQh64pvNg/n8VRWFvblHuUN1bghOTyEWhY46B5TA8B8ZiLSkk9oONWT 56znNblslRlmJBd2+ihTBCyaL9IVk1nbaoEOMVjdMnJQW32cBnu6aCSAeVR0FGArWZum pOqfSTPHGAC+gtd6E/HMj+U0/3RRbRGPJZTmmOcGs+eFHpz+JWA6t5jcVHg//nnMD4Lc CTIuW5yiMVbf+XGj/0cCEWfVC/hE25k2Ltx1rrHBHY+FpYBQa4Mm3I6s+GSdCReuy5Qm nRbqkGKkgZtz1BqgU76430t57PWpjzRbetFDMTIqI4hwt6XWiEPSyxrYSgT+pgYl/R+h u8IQ== X-Gm-Message-State: AOAM533ovH43rE7iyJ5dpEcWrGqAakAIYRNSNnb15j5QKS0LYG7F4HAg i9Esjr3KC24SvSnS4mFfrEtPqA== X-Google-Smtp-Source: ABdhPJy8pOyI5R6E1lUEqrN7U7Gug8UnHKhW1d2kP9mPOZ7o3BUcpHInuWAxiuMFpevkmM5pJ+272w== X-Received: by 2002:a5d:5903:: with SMTP id v3mr12168170wrd.405.1619515224573; Tue, 27 Apr 2021 02:20:24 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r24sm1939816wmh.8.2021.04.27.02.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 02:20:24 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 27 Apr 2021 11:20:11 +0200 Message-Id: <20210427092018.832258-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/8] 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 Acked-by: Liviu Dudau --- 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 27 09:20:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12225699 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.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,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 A0540C433ED for ; Tue, 27 Apr 2021 09:20: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 407F461026 for ; Tue, 27 Apr 2021 09:20:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 407F461026 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 D70D76E929; Tue, 27 Apr 2021 09:20:27 +0000 (UTC) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by gabe.freedesktop.org (Postfix) with ESMTPS id A2CAE6E927 for ; Tue, 27 Apr 2021 09:20:26 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id l2so6356547wrm.9 for ; Tue, 27 Apr 2021 02:20:26 -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=lHcSeuO8JXlioU0SoJkhNjeUMSk697hQ5zjRlICZIdlcoCD+gtNxmqtsqVaoejeIqF JVkbZ4vwo0H7UnWI6b/SRN11ITJY5qZrNUtNBWPwhSqHZ0aDzFYt65GC1/dJLw4AR9d5 kPi4sCxP4h02OO5vhQbXsNHkUWX1w1OD5rfsM= 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=sRQoOJK4I3tq7y5V4tkio2yAZHsw3gywfEQUHT1xSwIKAj1dgvQcu/oabVa6nyyAtQ LeYPmCVLpYu/wEn/kOQqQ9sRpP9rZEWBl7QEmWlDucVdMubtLuADatdVLXXkS44xQeRW v6N+2nSXCQ/Pzfbqz0GvfhWUqV3S7UR/qpHaXLCIpJfbHin+bCQvlW52TXNuciVsrQsl RRG6q2BJ96ojjXD89CP1Pc4lUTVJVY6ppf6/73Df5i/MmIzEDskh6VdB2xV7b7ZIhTF+ 5cFsXvFjyoWGvkI3GryVNaqI4U2GmjQYTfK32DDg2rNvzdcK+3OEgT6FjXn/4pXvYrZv yKTA== X-Gm-Message-State: AOAM531Ca3gJuVFlvsBytchkXKaf1/uBJJEy+9j1OdpjcraRA1Grhjcy Bih5t0tnhcdZc5HFp5odXWxNvg== X-Google-Smtp-Source: ABdhPJzvyNyHijFaOxhyQ5XBzpoVz9wyxCqtYwON0mcdqndBwfa9nQPuaqV5R5FcJKMQq7TH0Bmpog== X-Received: by 2002:a5d:444d:: with SMTP id x13mr28571123wrr.406.1619515225336; Tue, 27 Apr 2021 02:20:25 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r24sm1939816wmh.8.2021.04.27.02.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 02:20:24 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 27 Apr 2021 11:20:12 +0200 Message-Id: <20210427092018.832258-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210427092018.832258-1-daniel.vetter@ffwll.ch> References: <20210427092018.832258-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/8] 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 Acked-by: Liviu Dudau --- 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 27 09:20:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12225703 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.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,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 08CFBC433B4 for ; Tue, 27 Apr 2021 09:20:43 +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 67D3061090 for ; Tue, 27 Apr 2021 09:20:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67D3061090 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 0F2826E92F; Tue, 27 Apr 2021 09:20:30 +0000 (UTC) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by gabe.freedesktop.org (Postfix) with ESMTPS id A73C06E92A for ; Tue, 27 Apr 2021 09:20:27 +0000 (UTC) Received: by mail-wr1-x429.google.com with SMTP id a4so58712859wrr.2 for ; Tue, 27 Apr 2021 02:20:27 -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=qm2F088UQNMNyW0Vmb8+hr1UPrlvXjrn+pu54h1Ytnc=; b=bg/jsUQbIKrdZ9DmiTEtqhQ0MRAaBJpuDSG1nptwgu0H9xLxybOUsWP5W3xfNUWuP4 jiFoaGuwC02Bs0umcQgS2tzs5k2bAZTIvWmiysrHx2vxEOkAwCI2d2FvoZCM2nZqjOff SIQCWMbZisu9i+60VofiJQ36oaBztzniAHf7o= 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=qm2F088UQNMNyW0Vmb8+hr1UPrlvXjrn+pu54h1Ytnc=; b=CdQvtPsmkNEWmRK9yD9WDGPVKyXW7Mzt83i6YaDjWOFT7QdsBnBCPidOnivbWg0lmG W9HPd8crYkLhEt2rlmO4VgXVZ1P6vhsIrsRH6HBhDcDyesGxPSK0Kj8SQM57YnvB8Q9v RLiLMrRSvpxrUDMh3RO+l1a8gfPBdOF7tloPqITVE2CPCRPy+rglMSea5fR54Lmnl/ke AAgvDfO08PHQqXhGMA03Pmwd9ev28ifvxzILxdDHX/CuwMj3DG8200JukeBCCWozmVK3 vdw9GwMxCagZcmTKICShHGn4/uJis8LNnNfqqdzeMbqfs7tbdYUeis6hK3XlAGyzifz7 slCw== X-Gm-Message-State: AOAM533qO074YsvDmR1Vg++BQnBLW8gU4fp0c8xZqd/80if7XNVj1BXM HcdBsy13TQg/b0+BMYoDS6IIxg== X-Google-Smtp-Source: ABdhPJxs1AGSu6rzENrdE0L+jjPD7uX0+z+GMCIuMhi3W/M1AqpxFi26cW4c4dhxGaUCoSdaHH3tng== X-Received: by 2002:adf:8046:: with SMTP id 64mr27440671wrk.176.1619515226357; Tue, 27 Apr 2021 02:20:26 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r24sm1939816wmh.8.2021.04.27.02.20.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 02:20:25 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 27 Apr 2021 11:20:13 +0200 Message-Id: <20210427092018.832258-3-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210427092018.832258-1-daniel.vetter@ffwll.ch> References: <20210427092018.832258-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 3/8] 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 4bbc81d8d649..d2c6959190ab 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -11731,8 +11731,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 27 09:20:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12225701 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.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,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 04BD0C43460 for ; Tue, 27 Apr 2021 09:20: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 9846D61026 for ; Tue, 27 Apr 2021 09:20:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9846D61026 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 929CC6E92B; Tue, 27 Apr 2021 09:20:29 +0000 (UTC) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F6C56E92B for ; Tue, 27 Apr 2021 09:20:28 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id p6-20020a05600c3586b029014131bbe5c7so3386145wmq.3 for ; Tue, 27 Apr 2021 02:20:28 -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=ReR+qIwa27lRq+WXnj64eqAh7xIIkZ1ocFvCO3rmgbA=; b=JL+d9Be+1fsOLPsXOKUrRxgZxa39qLYpQ0YrL1WSRQH8EeOSU9TuY5SCxkhZ8bTnvg kADgMit5Tjswacswy/wlSRX+5XV/KC1tpCJx/GM65VHOTIr/90IX9etPOTBp18znldlC cVpPMLJJsEIYJJxXX9Tvk62NITCamUFMsPFZ0= 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=ReR+qIwa27lRq+WXnj64eqAh7xIIkZ1ocFvCO3rmgbA=; b=cz1yuN89/tDEhS/NXcOrWdfDxTzM4Dn7nFsHTdsvBfXfLb0NxaaIh1DSMvk/58KKmi TR8ig9RmoolahMqVf5sCkuYrufkxqSGpoz2pgS+I0TmstT9PF1cUSDbgxjPxpv+3QlE2 suN9FrnN690oag2VIIL7PdHu2MxCeDwo6ldXvwO1ig6UhcfhlrNfG5WP1goLpuYzCXAK hDF3ja9TxOrnE1VxVONXMww9yce2/CByGjLjWWaBS3qLimXwFHJVmzaB9gE3caw1ji3Z fyJwpaDpyNj4ATdZ6p2kx5c7TPefuq2YbfwsNAxs1XXStCK1E/eKVfRbU/qwwsR+Qdch Ileg== X-Gm-Message-State: AOAM531ok6M9OMoRCcNhp/MNqqVxjHS2olkW4fS2v/bOfD6pZo9t3c72 IOHjdod4gp6oBp0lz26zlzucuw== X-Google-Smtp-Source: ABdhPJxY1xvtgR31iORQGe6Y6cpHVeXgo9kkirI7wziiPBd6Q7J0bcoSuMCknwVDmZApxntHIbq0lA== X-Received: by 2002:a1c:228a:: with SMTP id i132mr7321975wmi.10.1619515227165; Tue, 27 Apr 2021 02:20:27 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r24sm1939816wmh.8.2021.04.27.02.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 02:20:26 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 27 Apr 2021 11:20:14 +0200 Message-Id: <20210427092018.832258-4-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210427092018.832258-1-daniel.vetter@ffwll.ch> References: <20210427092018.832258-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 4/8] 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. v2: Rebase. 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 88e9cc38c13b..93bc3575bf53 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; - dev->max_vblank_count = 0xffffffff; /* Disable vblank irqs aggressively for power-saving */ dev->vblank_disable_immediate = true; From patchwork Tue Apr 27 09:20:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12225709 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.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,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 EFCBCC433B4 for ; Tue, 27 Apr 2021 09:20:48 +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 96BF261090 for ; Tue, 27 Apr 2021 09:20:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96BF261090 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 EAF486E932; Tue, 27 Apr 2021 09:20:32 +0000 (UTC) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by gabe.freedesktop.org (Postfix) with ESMTPS id 53C5B6E92C for ; Tue, 27 Apr 2021 09:20:29 +0000 (UTC) Received: by mail-wm1-x335.google.com with SMTP id n84so4196818wma.0 for ; Tue, 27 Apr 2021 02:20:29 -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=Z16j2RO/tMcGi97O2Wslzw0bl7bocm0CdNceuYd7FR8sWpRYd7HG8Ip8qfiUZDTvlT HTaHagRZcPEwezykSoz1I9uWSEHmisn2dZaORuS6cS6VxZGe3iTz3jK4Q4TLwFAEhfb/ jtCm3FT1ZJ50M7FTWm5j9OQPvDmXnxLTCcXaY= 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=IoaQAx03jWxJF/xTAvPqu4P2cax44GZlWGIxyoRkYBDSfTbg0RdD6CX0d735Bl5Q6m yYXQcsd2cmxv59RZ7J6n4ph6SqREzSDnU0b0zHTQ/8Dq44yQRhNKpfGDQPVuGh8qHR9Y fbak+r1rbHqfk4qlPfLFnaqlN4cw8f2Fvp0+pEOrTPbjgGvhonRfjjOKm6mR04yfM9oP 9BGDk3rBEGS1PQT0trE7TDn2WiP3gy3/+NThpdj+K23MXm+nsuEIyQ+9KraYbxg6WF2a BbJna2N2/nDqO0tSIUpqSDFujOHZRvJYviw2q1BgKwegETUxhmriTOO2X7QTY63GdBtV MKnw== X-Gm-Message-State: AOAM530mGg4N1XFfyComSEb/g9QzRIOTZGoa0jKgvHLercZx//oGJaxp 1jnJhZN3q/fn813RIy2CdQfjQg== X-Google-Smtp-Source: ABdhPJzbPrCtq40L5ZJcK4JYJvh90uc/ZVxSStrcaxlXHngaxKYQB0bYS5ro9fj1IS+08On3AC6WBg== X-Received: by 2002:a7b:c017:: with SMTP id c23mr3191439wmb.175.1619515228054; Tue, 27 Apr 2021 02:20:28 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r24sm1939816wmh.8.2021.04.27.02.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 02:20:27 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 27 Apr 2021 11:20:15 +0200 Message-Id: <20210427092018.832258-5-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210427092018.832258-1-daniel.vetter@ffwll.ch> References: <20210427092018.832258-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 5/8] 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 27 09:20:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12225705 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.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,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 F3BB9C43460 for ; Tue, 27 Apr 2021 09:20:46 +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 907B1613BC for ; Tue, 27 Apr 2021 09:20:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 907B1613BC 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 191876E935; Tue, 27 Apr 2021 09:20:31 +0000 (UTC) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by gabe.freedesktop.org (Postfix) with ESMTPS id 418106E933 for ; Tue, 27 Apr 2021 09:20:30 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id d11so852487wrw.8 for ; Tue, 27 Apr 2021 02:20:30 -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=eqYcy5pEgjEbNBPBox4dInLBHfCo5j5j+wLOf5FWeDDHDm35ZfHa+F5PzHefmdBR6Y mQW4c1LZ9C340D8p4VatAiPiLY3FHujh7UGENv0MV6WyIJwZcmvgTMPp/O/XIZZvCLfc tqpPiLk+lTMEF0Qfwn2RGiopa0yyp2/jXUk1s= 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=NZ1JKt0dV3ZHi8neKK78cK94B5C1gqs6w17kPskP6a2KL5tvieY80hSYJypHLZtewi eL5BRkEnSPacotxmQxxYh0SInW6iShU7LIN1nVse7U4+rYo38tA//RX2GEQNQ0p2bjPZ G7ahOyiXkeiqihP9IVUKnIGq55HNq6Z6nJGwB6EL9DoukL/B2ESjC2GcAF3Nq889I36R t1b6cILyvql9IaAJyKvf06cCtE/HdyG/soqgMUH3PGVwrMTQNzn3wIAHpfGtvIHL28dW 7XReT9iAmyqnOPYeZgqEfN0msfSeZNzn6PlQ6WdouL/SiJSvao5hE53ILlEjyUU7RZuD wpOw== X-Gm-Message-State: AOAM5305/3UgfwqXxqvuswDHB/hyxf/5RMiPx1s3QScnUHDUax/BI3om pN/IToiDDjUlYp7L+1x41hsznQ== X-Google-Smtp-Source: ABdhPJxBaxOImxswpfiXYoCXOXsQQQFm/5Ib8J6++xeSyqcKN0bxddZpkjc1KLyL1GncdKpYFf7B5A== X-Received: by 2002:adf:e60d:: with SMTP id p13mr18428250wrm.326.1619515228862; Tue, 27 Apr 2021 02:20:28 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r24sm1939816wmh.8.2021.04.27.02.20.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 02:20:28 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 27 Apr 2021 11:20:16 +0200 Message-Id: <20210427092018.832258-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210427092018.832258-1-daniel.vetter@ffwll.ch> References: <20210427092018.832258-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 6/8] 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 27 09:20:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12225707 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.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,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 2B5F4C433ED for ; Tue, 27 Apr 2021 09:20:48 +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 C9DC4613B2 for ; Tue, 27 Apr 2021 09:20:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9DC4613B2 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 1B5C66E933; Tue, 27 Apr 2021 09:20:32 +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 F0D146E932 for ; Tue, 27 Apr 2021 09:20:30 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id l2so6356770wrm.9 for ; Tue, 27 Apr 2021 02:20:30 -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=j70/j4Q6iKYIxCEI65Y0bUzPGkZaKggFmUgvWzLANdx/wAlWVz5KESFnUo/9nujbKh VLP5WnQX348e0Gey0yAOo51JoWFEbWPfgaXyi9p9J6I5/voq6u34z4Oxv3HsLIDFdL7g 0nWF5RWbWoYPwCh6yJUMjw/QcUh+2F/NVjfgY= 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=eX6GPVyFSyFnKY6Xo6b+eDrlZCe0tdq0TgPt8DKs/Sx0FBavdrfL9kBr4BSk2iqUhZ tfUuxDOudsyPmcnnXnDe2LxHXJXIQvD1TDuU3/aEfaoWz1QSJBEQb8q2eUcaHrKXc8uz RFEmU2yotWQH+3L/Y3V/94/clGiaxkjhr+Q7p8ODnQi0HmhrBvsWO2qWiC9ZxUxtV0i+ TP6wDSDg7vo45QaVkuxANWgS1iuFVhiOjWNDhq6hebIY+YIHO3LLPCuN/IM+HENTvlah O+tRpI+ZQNTJ2W7DMMoyFFePcqISBuxYwjcU3DQifPNYmtA1PMZdHDvM5JIf4HPZAC5J yQQw== X-Gm-Message-State: AOAM5308hnA4EYvKspbAr2FRTFmhL4pCftSdfIUJMt3+PBEohJmNrE/7 aYGx+WU+fASeK3F8HyyC9RbtLQ== X-Google-Smtp-Source: ABdhPJwJ9rr2VWEzV2GSpk5dJ+S0Jiuw0XEyEGp+d22nZbMqEXF/DE1cG/lDbVU7T/v0ew7G7SdRhw== X-Received: by 2002:a5d:4b12:: with SMTP id v18mr28184586wrq.45.1619515229738; Tue, 27 Apr 2021 02:20:29 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r24sm1939816wmh.8.2021.04.27.02.20.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 02:20:29 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 27 Apr 2021 11:20:17 +0200 Message-Id: <20210427092018.832258-7-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210427092018.832258-1-daniel.vetter@ffwll.ch> References: <20210427092018.832258-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 7/8] 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 Acked-by: Philippe Cornu --- 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 27 09:20:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12225711 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.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,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 79849C433B4 for ; Tue, 27 Apr 2021 09:20:52 +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 3744061026 for ; Tue, 27 Apr 2021 09:20:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3744061026 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 823876E93A; Tue, 27 Apr 2021 09:20:34 +0000 (UTC) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by gabe.freedesktop.org (Postfix) with ESMTPS id E87D56E934 for ; Tue, 27 Apr 2021 09:20:31 +0000 (UTC) Received: by mail-wr1-x429.google.com with SMTP id d11so852577wrw.8 for ; Tue, 27 Apr 2021 02:20:31 -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=cqP0gjc1UtzViswayeYBkOIxC7p7CX3JMgXUxI4EqHg=; b=XlkIchkuAqzR02//z/8rHKE0NKhNuLJTVZER4lpBdGGOLCqjnyyu7ruxnlyWcM3mfM 3H1UVfG8giq2OJxoqtHBKxnXQu6aT7cvF8xAEiVE0HX+NtZYedtm4QRboi2pJ8w0ahgF C1xOq7ubv1pPeLMx66CLx+UrrAhGZ+S7v6iug= 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=cqP0gjc1UtzViswayeYBkOIxC7p7CX3JMgXUxI4EqHg=; b=Xfvr4GLPIEm0z5csIXsx1yE2E5pjRlxvLyYPwqQiOJnBm2ZAipJwO/mutVQfUEgh98 tG2xMf2K8S+HMis7qZvtuMfA5m058rPpMraMpDb2QArSADkRsdECbwOvutO1zlxX5HOm v/3yXzacoA2Kl0fYuNyynV8BQ8RHZ1pkXZwz0rfCSjVIGQiD2m3T63Ecbgk9vB2JNSc4 kKErBunpDFMcpwSa0+zxQPRJylY1BAPfFlbrTEGApOOG5Bgu0aOyn/eP0qN2p+T/tqhM WObgvgN+BkQwbMlFwyXIk37B1ube2uRRmn927uTII+yXShtw5r1bjm4s+7N/wGF/TTUS 2nAA== X-Gm-Message-State: AOAM530NcgAetukYt7E2tKI1gP+QFyQ1Xu2J0c7oydXHl+hlwRtKSjjN z5RixLglNP13JM5xNc9cZt7sUA== X-Google-Smtp-Source: ABdhPJzFTPu8PR2Hkya76z2tUgTkdBNHRW1jhO6CUU2wi4dYHPpDs0xPUpM0knu4xaa5W+ugt8qT3g== X-Received: by 2002:adf:ee0b:: with SMTP id y11mr28031670wrn.75.1619515230687; Tue, 27 Apr 2021 02:20:30 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r24sm1939816wmh.8.2021.04.27.02.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 02:20:30 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 27 Apr 2021 11:20:18 +0200 Message-Id: <20210427092018.832258-8-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210427092018.832258-1-daniel.vetter@ffwll.ch> References: <20210427092018.832258-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 8/8] 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 , Maxime Ripard , Thomas Zimmermann , Simon Ser , Daniel Vetter , Lucas Stach 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. v2: - Make the capability a link (Simon) - Note that all is lost before 5.1. Acked-by: Maxime Ripard Cc: Simon Ser Reviewed-by: Lucas Stach 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: Simon Ser Reviewed-by: Emil Velikov Acked-by: Pekka Paalanen --- drivers/gpu/drm/drm_plane.c | 18 +++++++++++++++++- include/drm/drm_mode_config.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 0dd43882fe7c..20c7a1665414 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -128,6 +128,13 @@ * 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. Before linux kernel release v5.1 there have been + * various bugs in this area with inconsistencies between the capability + * flag and per-plane properties. */ static unsigned int drm_num_planes(struct drm_device *dev) @@ -277,8 +284,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 +373,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: *