From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 1CBE1C433C1 for ; Wed, 24 Mar 2021 12:10:44 +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 A20D661A02 for ; Wed, 24 Mar 2021 12:10:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A20D661A02 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B84F6E96A; Wed, 24 Mar 2021 12:10:43 +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 548EB6E96A for ; Wed, 24 Mar 2021 12:10:42 +0000 (UTC) Received: by mail-wr1-x42c.google.com with SMTP id z2so24218640wrl.5 for ; Wed, 24 Mar 2021 05:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fooishbar-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E1r72OauA/gIlBZG4tpWGGoc73ZgVn8gVGRpZUotXuw=; b=rCK5pLhwzKoFjQw8S59dsGIMkFF95NbFNom0to3arSujGa6IUXzB493PEmjkS1aLDI J3U38UqhsOX4pjHxdVE8T8OjLZde3Mgplmt2zX+g7DXeKd23qcaXyBkYEDYVIhIamMAS nmcEjhWGrtqB8Gy7SRkhqpN/EKBPWtQbsjMZ+GxxGV3qUAipcMoz5C/0PVltHhx4pa3d TJQmWb0AN9xigzsrReG5aXCNWxvm7ncreuZYQXtCsb4C2M1xAlE9vJ0qI3VIA2HYSmwn 3hE+dyCvIQY49+aaBJylMbeSSEYlmgR34FEicMrzSLWxTz2khsO3/9E4AHQf0cftYQc6 fKuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E1r72OauA/gIlBZG4tpWGGoc73ZgVn8gVGRpZUotXuw=; b=pjOXGreTz920IjMLHpBMIVFtfEkUXQDenkqn1Q2wY13QCFmPtx2n/EJ8g4ac+YPklR +QfMcOz0RtVA4ocAVGv1LwuB7c3cyKPEtUE+jvcfbJlw++VmcwQY/Kt1Ie+48lUVx9js FkFZEckMKCj2E2oewVY8UyXjEUBdk6Y5EwSQz5K+K1WQpi1AqCWrRE5ZmaqaXJK9A4Is DSsXehdOt1Dgx11YRePW8shLdDEdG/AZML+hiBknc32vHmh0Qa+nAqGhMHjGUIjzYXOK r1qv4An+HA2yrUiiq/ems7X2App3Nj4FnIFZ5NxG76lacWoU8RjDAYobwgS99Wius1Hx EjbA== X-Gm-Message-State: AOAM531Cf4GHK6VNzSPQS0UsGNFTafE20Kf0YyXvQSCaoB/gqLXkIQHR s9H1GtYioflAUBW5OfG63aeFXYvCKt38jErVGujNfA== X-Google-Smtp-Source: ABdhPJzBQsDAv6Xrhm0OaPaUIM0Wxc4Y6jBcCrV3NcGzD2Y5CwNPU7cPSK8lPuAC3mBM5g1xg5XezhvVhnxc64DiIIg= X-Received: by 2002:a5d:6c67:: with SMTP id r7mr3129138wrz.373.1616587840870; Wed, 24 Mar 2021 05:10:40 -0700 (PDT) MIME-Version: 1.0 References: <20210310161444.1015500-1-markyacoub@chromium.org> In-Reply-To: From: Daniel Stone Date: Wed, 24 Mar 2021 12:10:15 +0000 Message-ID: Subject: Re: [PATCH] drm/amdgpu: Ensure that the modifier requested is supported by plane. To: Bas Nieuwenhuizen X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Yacoub , =?UTF-8?Q?Michel_D=C3=A4nzer?= , amd-gfx list , Maling list - DRI developers , "Deucher, Alexander" , Mark Yacoub Content-Type: multipart/mixed; boundary="===============2009224534==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============2009224534== Content-Type: multipart/alternative; boundary="00000000000000f5aa05be473062" --00000000000000f5aa05be473062 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 24 Mar 2021 at 10:53, Bas Nieuwenhuizen wrote: > On Wed, Mar 24, 2021 at 11:13 AM Michel D=C3=A4nzer = wrote: > >> No modifier support does not imply linear. It's generally signalled via >> DRM_FORMAT_MOD_INVALID, which roughly means "tiling is determined by dri= ver >> specific mechanisms". >> > > Doesn't quite work that way in the kernel sadly. If you don't set > DRM_MODE_FB_MODIFIERS then the modifier fields have to be 0 (which happen= s > to alias DRM_FORMAT_MOD_LINEAR and then now deprecated > DRM_FORMAT_MOD_NONE). This is verified in shared drm code. > > (and all userspace code I've seen simply doesn't set DRM_MODE_FB_MODIFIER= S > if the incoming modifier is DRM_FORMAT_MOD_INVALID) > Yes, but even though the field is zero, the lack of the flag means it must be treated as INVALID. If the kernel is not doing this, the kernel is objectively wrong. (And I know it doesn't do this in most cases, because otherwise I wouldn't be able to use this GNOME session on an Intel laptop, where modifiers are blacklisted.) Cheers, Daniel --00000000000000f5aa05be473062 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, 24 Mar 2021 at 1= 0:53, Bas Nieuwenhuizen <bas@= basnieuwenhuizen.nl> wrote:
On Wed, Mar 24, 2021 at 11:13 AM Michel D=C3= =A4nzer <michel@daenzer.net> wrote:
No modifier support does not imply linear. It's generally signalle= d via DRM_FORMAT_MOD_INVALID, which roughly means "tiling is determine= d by driver specific mechanisms".

= Doesn't quite work that way in the kernel sadly. If you don't set D= RM_MODE_FB_MODIFIERS then the modifier fields have to be 0 (which happens t= o alias DRM_FORMAT_MOD_LINEAR and then now deprecated DRM_FORMAT_MOD_NONE).= This is verified in shared drm code.

(and all use= rspace code I've seen simply doesn't set DRM_MODE_FB_MODIFIERS if t= he incoming modifier is DRM_FORMAT_MOD_INVALID)

Yes, but even though the field is zero, the lack of = the flag means it must be treated as INVALID. If the kernel is not doing th= is, the kernel is objectively wrong. (And I know it doesn't do this in = most cases, because otherwise I wouldn't be able to use this GNOME sess= ion on an Intel laptop, where modifiers are blacklisted.)

Cheers,
Daniel=C2=A0
--00000000000000f5aa05be473062-- --===============2009224534== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============2009224534==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 A8CA1C433E1 for ; Wed, 24 Mar 2021 12:10: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 52CEB61A05 for ; Wed, 24 Mar 2021 12:10:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52CEB61A05 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 78AA56E9E1; Wed, 24 Mar 2021 12:10:44 +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 55F626E9E1 for ; Wed, 24 Mar 2021 12:10:42 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id v4so24192802wrp.13 for ; Wed, 24 Mar 2021 05:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fooishbar-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E1r72OauA/gIlBZG4tpWGGoc73ZgVn8gVGRpZUotXuw=; b=rCK5pLhwzKoFjQw8S59dsGIMkFF95NbFNom0to3arSujGa6IUXzB493PEmjkS1aLDI J3U38UqhsOX4pjHxdVE8T8OjLZde3Mgplmt2zX+g7DXeKd23qcaXyBkYEDYVIhIamMAS nmcEjhWGrtqB8Gy7SRkhqpN/EKBPWtQbsjMZ+GxxGV3qUAipcMoz5C/0PVltHhx4pa3d TJQmWb0AN9xigzsrReG5aXCNWxvm7ncreuZYQXtCsb4C2M1xAlE9vJ0qI3VIA2HYSmwn 3hE+dyCvIQY49+aaBJylMbeSSEYlmgR34FEicMrzSLWxTz2khsO3/9E4AHQf0cftYQc6 fKuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E1r72OauA/gIlBZG4tpWGGoc73ZgVn8gVGRpZUotXuw=; b=rf2zBeYoITJU3IwERhrnJF/LNcMKTXKFikyKw2CK5KX4b3X1yIO77CWjrGNpoR1YS/ Bvi2UMidBkBOnu6p50HqtHj9q6bWDE4s3iMxG6aS2RLuBEEsvbQiXIDeuAqi6hue1yi9 kp5Qo8tjpj0H3lTeT/+P2pSgdbpE3vP1TG5xdOPqJOXd9U8/dli0kPqcLbCfSqVY+sW1 g8SuAgbS4Xqb9wTP5jRYBPp9d2kbgrV8QCmAe0CtHARcrsItO6I+xj4JAe7FwHjZV46Y wuoJxLBvGAA4odn32S5t2yYUK6d89q9yjonhA9u+4fniQ+d0qC+1N5/Zg1HTW5VGAn1s 9rFA== X-Gm-Message-State: AOAM532PUAK5Gla/+z88geHPWFSmbbTiQfnbyxpzXGCLjHtZAOrrAUJV /CcTleCVm8FGfzj4EmWtooPUKPTsvkzWxCWFmqOd/w== X-Google-Smtp-Source: ABdhPJzBQsDAv6Xrhm0OaPaUIM0Wxc4Y6jBcCrV3NcGzD2Y5CwNPU7cPSK8lPuAC3mBM5g1xg5XezhvVhnxc64DiIIg= X-Received: by 2002:a5d:6c67:: with SMTP id r7mr3129138wrz.373.1616587840870; Wed, 24 Mar 2021 05:10:40 -0700 (PDT) MIME-Version: 1.0 References: <20210310161444.1015500-1-markyacoub@chromium.org> In-Reply-To: From: Daniel Stone Date: Wed, 24 Mar 2021 12:10:15 +0000 Message-ID: Subject: Re: [PATCH] drm/amdgpu: Ensure that the modifier requested is supported by plane. To: Bas Nieuwenhuizen X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Yacoub , =?UTF-8?Q?Michel_D=C3=A4nzer?= , amd-gfx list , Maling list - DRI developers , "Deucher, Alexander" , Mark Yacoub Content-Type: multipart/mixed; boundary="===============0250128701==" Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" --===============0250128701== Content-Type: multipart/alternative; boundary="00000000000000f5aa05be473062" --00000000000000f5aa05be473062 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 24 Mar 2021 at 10:53, Bas Nieuwenhuizen wrote: > On Wed, Mar 24, 2021 at 11:13 AM Michel D=C3=A4nzer = wrote: > >> No modifier support does not imply linear. It's generally signalled via >> DRM_FORMAT_MOD_INVALID, which roughly means "tiling is determined by dri= ver >> specific mechanisms". >> > > Doesn't quite work that way in the kernel sadly. If you don't set > DRM_MODE_FB_MODIFIERS then the modifier fields have to be 0 (which happen= s > to alias DRM_FORMAT_MOD_LINEAR and then now deprecated > DRM_FORMAT_MOD_NONE). This is verified in shared drm code. > > (and all userspace code I've seen simply doesn't set DRM_MODE_FB_MODIFIER= S > if the incoming modifier is DRM_FORMAT_MOD_INVALID) > Yes, but even though the field is zero, the lack of the flag means it must be treated as INVALID. If the kernel is not doing this, the kernel is objectively wrong. (And I know it doesn't do this in most cases, because otherwise I wouldn't be able to use this GNOME session on an Intel laptop, where modifiers are blacklisted.) Cheers, Daniel --00000000000000f5aa05be473062 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, 24 Mar 2021 at 1= 0:53, Bas Nieuwenhuizen <bas@= basnieuwenhuizen.nl> wrote:
On Wed, Mar 24, 2021 at 11:13 AM Michel D=C3= =A4nzer <michel@daenzer.net> wrote:
No modifier support does not imply linear. It's generally signalle= d via DRM_FORMAT_MOD_INVALID, which roughly means "tiling is determine= d by driver specific mechanisms".

= Doesn't quite work that way in the kernel sadly. If you don't set D= RM_MODE_FB_MODIFIERS then the modifier fields have to be 0 (which happens t= o alias DRM_FORMAT_MOD_LINEAR and then now deprecated DRM_FORMAT_MOD_NONE).= This is verified in shared drm code.

(and all use= rspace code I've seen simply doesn't set DRM_MODE_FB_MODIFIERS if t= he incoming modifier is DRM_FORMAT_MOD_INVALID)

Yes, but even though the field is zero, the lack of = the flag means it must be treated as INVALID. If the kernel is not doing th= is, the kernel is objectively wrong. (And I know it doesn't do this in = most cases, because otherwise I wouldn't be able to use this GNOME sess= ion on an Intel laptop, where modifiers are blacklisted.)

Cheers,
Daniel=C2=A0
--00000000000000f5aa05be473062-- --===============0250128701== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx --===============0250128701==--