Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp915588rwi; Thu, 20 Oct 2022 06:45:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5usN3WrNjCbrcX3ohdfXanRsrrNBbn1bYV7xm8mpw151eGZOH1ABof8iQEf/TBQJ0k8T2O X-Received: by 2002:a17:907:6297:b0:72f:9aad:fcb with SMTP id nd23-20020a170907629700b0072f9aad0fcbmr11058922ejc.161.1666273527418; Thu, 20 Oct 2022 06:45:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666273527; cv=pass; d=google.com; s=arc-20160816; b=roRksHsHf9nvmVjFLcw16kazRe9cFuB/AQX+3Y3WWXRNgY2edDpC5hUAWdmS0/0ovs WD6AIsPG0VAQ5buXscj6NyVoylY49S2Cpsm2vxhmvHUhPOIaMhk50iIrjEkmoxP1NL0O Q89/2PKcHxt0X8+fu/LO3Ya8W6qEe/1AxHkBw3TPnlEn7A1KR3Tkfp2Dq9QEpv7tzBrp 2F6F+ksCg4gh7g/YLBHrINCNnhPoDznGW90kOThlXQF8vD4cdj9sZEREPVL2UD/R1yR6 0XPYWJtP6UvZdyQRKgH/9Iqv0W1eVVrxer7z65kaOZLrMGWri5gSyZqDoz7WEUniDsH3 sEZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=NdGS4KXe9XUKpLpxDALHM17c/IMunNGUpcyggSxe2YU=; b=ExRZankwxg7Ro4/OepExEtGblcUf6fKbrOKUDUJARuzNHbV/yFXnzhnNnCsUsBaajW aTPTv6hBmZj/bN3v0nYUQlYN97IIJiaZZZ6yZA3uIcJsJuo9vSekJTShShP7xZxcv21a awh2TbTIwh3lfkK7C2dv1FVrJiVEKvjB+GszHjOldNt4YEzr3JsQcvXnG3WKReoQax3u vYudDMBXrhWQNYVQXAJ20uAYVin1yKC5qBzXY29etJNtghxJydO4IUGbGEaCHdaiypMc ljWyMiQGQC064M9iS+RpVl3YBIYIiDWPxo2yeVWXbJF2Dck5ntc1E9VVs8G8UqBUY0lj dbDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=YHEqvVNn; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020a056402090800b0045c7611d8ddsi19319861edz.179.2022.10.20.06.45.01; Thu, 20 Oct 2022 06:45:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=YHEqvVNn; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230003AbiJTMfd (ORCPT + 99 others); Thu, 20 Oct 2022 08:35:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbiJTMfb (ORCPT ); Thu, 20 Oct 2022 08:35:31 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2052.outbound.protection.outlook.com [40.107.93.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F09B12344E for ; Thu, 20 Oct 2022 05:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WbPPDxy0yTnzm7g3nGAHC/6T8it/wuqeQLJHoRXg4WAkIQaMngjhc/QFHgyVY6k/EvmuIGUP4iTyp7R8Xa5u5kdRXiuqBWXxCuDW5o1U6y0aOm4Q+eCrTMLXNm0B6sicLufgpF2xeeDfjaP5bgaefeq5hSTIk9vaZzz/chKiDJlL864GawYibNxWgVFARTrWf0WYLsZbtz3Gp6z1NlLVTm6ouE4t9O1wT6Y7/DC63Cp5xPwofu5ktC+D3w/Jg0JSFDiIHYoZw+jf/GCCLQUqBi1IF6eDP3xjIshnuNN/8x+LST75Uj4S5r85LhyFkAFPUbbxrqinPQdnvoNuYb4dXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NdGS4KXe9XUKpLpxDALHM17c/IMunNGUpcyggSxe2YU=; b=d4DAV+/Eq4lwsLVA1fpHcJdYhWO2qiWvmr1H/s9vUzpgfM981CiKA8c7FvanRjMIt2K4OSpJNFpRDJKMuO7fU95j2K8GB6X/nDw7PDwIyMnN20cV9brzNYd+Re7vQH/yXFEtwLhqZbZYL5RP3Y3YOE6Thz1WmFgtC2XoSSBlM/36rTMil+q8JuHwD6HHeGwJLpxTItt0toRvuDR9Fh7bRM8s7eL3+KAFCo50gMpzCfpmJOzF2egxNnJr0ss/BZyd5K34zvQPtuE5aYWZl+lYkr0XWHrM7fPUvf/aTMUFDjOAq5xvW3N1XU4jEfPPhYzH2M4OOCuHUqn8/d6ZlCmOug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NdGS4KXe9XUKpLpxDALHM17c/IMunNGUpcyggSxe2YU=; b=YHEqvVNnXNH/XdpZknl5wlhuLwjR8l+Xdy6w6lBfU3pWYj3IOwGz9aWFcsgRJ/WMkYy012bVsQqwDXClgEt0OLDFly1TVhOGWxtZg1ymCqhnr0ip1mgGDlYzRHiRtH9lRtor+fyfDRejBIbGHpZDnSxDZi8UYHryrgtKiakF1h0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN2PR12MB2941.namprd12.prod.outlook.com (2603:10b6:208:a9::12) by PH8PR12MB7026.namprd12.prod.outlook.com (2603:10b6:510:1bd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35; Thu, 20 Oct 2022 12:35:25 +0000 Received: from MN2PR12MB2941.namprd12.prod.outlook.com ([fe80::588f:c941:4f62:9d89]) by MN2PR12MB2941.namprd12.prod.outlook.com ([fe80::588f:c941:4f62:9d89%3]) with mapi id 15.20.5723.026; Thu, 20 Oct 2022 12:35:25 +0000 Message-ID: Date: Thu, 20 Oct 2022 08:35:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH] drm/amd/display: Revert logic for plane modifiers Content-Language: en-US To: =?UTF-8?Q?Joaqu=c3=adn_Ignacio_Aramend=c3=ada?= , harry.wentland@amd.com Cc: amd-gfx@lists.freedesktop.org, sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20221019151543.22753-1-samsagax@gmail.com> From: Rodrigo Siqueira Jordao In-Reply-To: <20221019151543.22753-1-samsagax@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: CH2PR11CA0008.namprd11.prod.outlook.com (2603:10b6:610:54::18) To MN2PR12MB2941.namprd12.prod.outlook.com (2603:10b6:208:a9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB2941:EE_|PH8PR12MB7026:EE_ X-MS-Office365-Filtering-Correlation-Id: ba5152b3-bd35-42c7-f4e6-08dab2978fbc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1AHt/4VaX6eNsFsOT3O5Z+JHFU2YrFRlhJFQLSrtK2ZgXPV02P8hVlmJjLpJTNB61axam8ge6jwF5FQsM9aZA+HeFUT0noNW7zoA1LyIQGDDfxZAmo6V7RHcQFsaWPd+kuaAM0LirwYqsLkIRFe39QHxP64OtQopNUXia0tBVUdmnqbK1PhYBMH6tPkWSv3ABwb73yWXY03P0iC8d9O3TN3GCY9yqSnJkvPOROzeYSLov9aD174Ywi8KGu1ubjnJ0zYz/IUOmm081T/AlWJDJYRPBbsnoqC1j/yRQrgDR9kewZfp8tgw0rf78rBzdpHT0S2ybFMIudGVxLNreDZYd4y2YQrtuhTdAyXOoJl4MahHml67XYSyqEvFC06rcNK51JXtFeDA6OHgjs0lyTe28SLksmJDTqv84nVNGjTzhA+Csz3xMOKgQVvyX7PPvhFr9j7MW31GAAAPFfQ0oX180XHBTgjaTMKvDYjOFEOg9ggOGLRmMPjN3TWLBRWoNfGzJGhed5EzbOnWG9YmQcUejCoXsgwoqckvPDwxy0Z6zTqJALJibByKCgNwTonZYclbUBLC9YOp0w/ydKdocV40uwP3/pdDCEoEtGStOtAgKfL+UUGaYxH34PQYC2DfkRCtTtRZkElOuKRtvwarVXp0cmyH0zkVBHUKvgdarTvTcRD7XQX1zqrsgen7E2OIDvTXqXVC2BC84gtf+gozwYVbQbbS4L6FUoftvC+7SeMw6a2G3AIC+MWZt/DNEecgy8Gyt3dc9HiHeLV4xPcs1ElG02cEbV8XaYNTpfxI/ffl47dpFDtL9VGi09PmtJhwaa1L X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB2941.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(396003)(39860400002)(346002)(136003)(376002)(451199015)(316002)(83380400001)(2906002)(31696002)(86362001)(38100700002)(478600001)(41300700001)(8676002)(66946007)(66556008)(66476007)(4326008)(5660300002)(6486002)(8936002)(6636002)(2616005)(186003)(53546011)(26005)(6512007)(4001150100001)(6506007)(31686004)(36756003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a2ZQSU1yTEw1VUNKOFpZZm95YVo2QzNIeTZ5SDdMK2lmN2IzOEpQeUlIOThk?= =?utf-8?B?SVRMQVU1a0gzNzY1RVhTd0tjbGF0UERESEF6cmJNSko5WFhRNktqRXZWNTB2?= =?utf-8?B?a1FGMGZ3NmliTHkwRHM1Tk0raUZOSDRPUXhia2lwWFNZS0RsU2NKZ3FwTG9X?= =?utf-8?B?SEs1cG9uQ0ZkbzViMzk5YytacGpsYnZta1BIVXVYQ2FjYmV4bldoMXRNb0hq?= =?utf-8?B?WEtZbklWb2MrMS9yOTcwNnB6MERJUVNtTTNxQU9MbkpkRytqaFBidnVRaGxT?= =?utf-8?B?cDhzNWlIUFg1ejMrOFhTYUFnaDVhRThaL0NranUxWlVTeXZvaklyWHB3TjVL?= =?utf-8?B?eU5ZNHY5cEFBM1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J+tsaPLps6Rjx?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba5152b3-bd35-42c7-f4e6-08dab2978fbc X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB2941.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 12:35:25.1271 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GQ9gA7s3u3NarQPem5JMnZnnNAU6T/GjNoyMkMlBxhrJ9tfcuXxogxJue4Hdo3RpCfQ95IQMoJ3jXoVMwwCQTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7026 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-10-19 11:15, Joaquín Ignacio Aramendía wrote: > This file was split in commit 5d945cbcd4b16a29d6470a80dfb19738f9a4319f > ("drm/amd/display: Create a file dedicated to planes") the logic in > dm_plane_format_mod_supported() function got changed by a switch logic. > That change broke drm_plane modifiers setting on series 5000 APUs > (tested on OXP mini AMD 5800U and HP Dev One 5850U PRO) > leading to Gamescope not working as reproted on GitHub[1] > > To reproduce the issue, enter a TTY and run: > > $ gamescope -- vkcube > > With said commit applied it will abort. This one restores the old logic, > fixing the issue that affects Gamescope. > > [1](https://github.com/Plagman/gamescope/issues/624>> > Signed-off-by: Joaquín Ignacio Aramendía > --- > .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 50 +++---------------- > 1 file changed, 8 insertions(+), 42 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c > index dfd3be49eac8..81c1fc9468b8 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c > @@ -1371,6 +1371,8 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane, > const struct drm_format_info *info = drm_format_info(format); > struct hw_asic_id asic_id = adev->dm.dc->ctx->asic_id; Hi, First of all, thanks a lot for this patch. You can drop asic_id since it is not used anymore. Thanks Siqueira > > + int i; > + > enum dm_micro_swizzle microtile = modifier_gfx9_swizzle_mode(modifier) & 3; > > if (!info) > @@ -1386,49 +1388,13 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane, > return true; > } > > - /* check if swizzle mode is supported by this version of DCN */ > - switch (asic_id.chip_family) { > - case FAMILY_SI: > - case FAMILY_CI: > - case FAMILY_KV: > - case FAMILY_CZ: > - case FAMILY_VI: > - /* asics before AI does not have modifier support */ > - return false; > - case FAMILY_AI: > - case FAMILY_RV: > - case FAMILY_NV: > - case FAMILY_VGH: > - case FAMILY_YELLOW_CARP: > - case AMDGPU_FAMILY_GC_10_3_6: > - case AMDGPU_FAMILY_GC_10_3_7: > - switch (AMD_FMT_MOD_GET(TILE, modifier)) { > - case AMD_FMT_MOD_TILE_GFX9_64K_R_X: > - case AMD_FMT_MOD_TILE_GFX9_64K_D_X: > - case AMD_FMT_MOD_TILE_GFX9_64K_S_X: > - case AMD_FMT_MOD_TILE_GFX9_64K_D: > - return true; > - default: > - return false; > - } > - break; > - case AMDGPU_FAMILY_GC_11_0_0: > - case AMDGPU_FAMILY_GC_11_0_1: > - switch (AMD_FMT_MOD_GET(TILE, modifier)) { > - case AMD_FMT_MOD_TILE_GFX11_256K_R_X: > - case AMD_FMT_MOD_TILE_GFX9_64K_R_X: > - case AMD_FMT_MOD_TILE_GFX9_64K_D_X: > - case AMD_FMT_MOD_TILE_GFX9_64K_S_X: > - case AMD_FMT_MOD_TILE_GFX9_64K_D: > - return true; > - default: > - return false; > - } > - break; > - default: > - ASSERT(0); /* Unknown asic */ > - break; > + /* Check that the modifier is on the list of the plane's supported modifiers. */ > + for (i = 0; i < plane->modifier_count; i++) { > + if (modifier == plane->modifiers[i]) > + break; > } > + if (i == plane->modifier_count) > + return false; > > /* > * For D swizzle the canonical modifier depends on the bpp, so check