Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1358812rwl; Thu, 5 Jan 2023 12:22:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXsVwD1+7Wng0uusEacUsuT7KErFdx7oHDbECAeJQpmQXJYsFOkcTmbB5SR47SPRTrY1E7Pw X-Received: by 2002:a17:906:6d47:b0:7c1:311f:3533 with SMTP id a7-20020a1709066d4700b007c1311f3533mr42549175ejt.60.1672950173856; Thu, 05 Jan 2023 12:22:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672950173; cv=pass; d=google.com; s=arc-20160816; b=KtthOaEcv9QmaHjWanS1QTkgn1F9g5/zwSSTZ3z9B7dUchRczrazB/ynOJ4ZsP5z1v ZQz5CpiH1kf+edMrayYHwNTYR3QBw6qGSfCLC2thrboCLza+3NxmItGVmo0uOB50s5fV O+IFKCjkjtpo9aihT8sy5FKY6KJih4UR52XoZWLnqL0HVXrdBTf4Jbj3XBx4/Kgf3eQz bOdw89YHrREC4FUA/t0fSzgL3qPbAu2XSSCfXdMq+PxICom6DS7x5+CQCDnVDJiLQJCO uTNSJCpAOXC0w/9AbFGA2uuoxsLX5sbbQy+SMmPvMmBIDcc4mvuqX/QgLtRuxjPAZfKZ SGow== 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:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=EtbRvyJWtwnvUYLd0zpuuPPzwX9YL6uSqoyfgiSgDCM=; b=W5DD+MJts8aQ3NbSKKeestQpmD1u5Zr/KaP5OFSEliDur+fZSJpWikmxdjOQH2mnf8 gDQ+J3g6IJxbv3Vx8JQwUOjDh5QpXVovs25s/lYsatih4MvudsmrOkceaeSVl1h2rmU0 aQczyzTdD/USIQ7lM0G3Lrv5rdS85pUHcgYnYasguOl0sgygOfJkFVe6qWWNYr5cQOnt YdxKjYnhmKKWxy2INQATpoSmetsw0zfpTfK9EXtXQoDlsNK5cVYhKj2fpiUWw1R5ZWW6 RVX3/Z2X+krUU3/m7itT8ARXwSwnVO33d1X5BRlE/X8T8PoWtZu9F0hqVpRKInvxTYka 3JnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="v6y1//Wg"; 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 uj42-20020a170907c9aa00b0084c3ce2f3dasi23073688ejc.738.2023.01.05.12.22.40; Thu, 05 Jan 2023 12:22:53 -0800 (PST) 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="v6y1//Wg"; 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 S235517AbjAEUHQ (ORCPT + 55 others); Thu, 5 Jan 2023 15:07:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234420AbjAEUHN (ORCPT ); Thu, 5 Jan 2023 15:07:13 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2065.outbound.protection.outlook.com [40.107.92.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D90F459FBF for ; Thu, 5 Jan 2023 12:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k3mgNzXLw+ZlMHQP4fwPePJSfslV9DZiHxIAvRTqxw2ipe1EYv4kDZh2p5XpsmWE8ck25RN412cjNydk8WGTbIK0TGZMnCcadIoePr8id6pQmys6y4pIotQ7/LjsDVWpmngTRzmCQEggJJhxWVLsVV1uZS2qffXsaDngQ5eLjgFjZXFEAIqrtbdDSlk/lVIsE6VpXLvncE/9k2ZNdGV/lWagGZrDeiNiTyEvKqZOfBKQ3vfFXra/N6exnFAQUWoB/nR2tiJWt58sZ1S3KoWXgLLpkyNZ4ADj1I6AQ/g2Q2C44KS+BKlexF4xP6l+BnXAzxEUpEBgJz3tyanDLKOUXg== 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=EtbRvyJWtwnvUYLd0zpuuPPzwX9YL6uSqoyfgiSgDCM=; b=mSaiG2AwkP5ryNuSPqMY1/I23lwKm8mK4fG9LVVOotam89U+sANwCTJ97JNpthY+gdhOKA+n0xsSrHI12+aGa0DqU8uMPArKyk+W8TJSpwLl9QCaLBe+NJjy7G0aMlK8/AYzwEHO4qvoDcrMxlEHsORyY2zCKudy/+8EtRVGraa5Pi4SZSMJMOhbJG6U/yH1TsChv5zObf3vrwafUdPiuG2Y7thox2+wCGj+T4aoUeGNl+Z5FSyyVwqz5OEACIbj505MwZT4juEO9Z6Fde6BWsnotk1mSJSvOQna1kKzpc6UQa43gDgdxPBcbmMeaKeMrrlW2n7LaHgEx7Ahnslchg== 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=EtbRvyJWtwnvUYLd0zpuuPPzwX9YL6uSqoyfgiSgDCM=; b=v6y1//WgQ7m5B+jVw6zr4SXJ9MpzENd+cCS6hEb/nT9tULuQFal2SC8xtrJHiBJSHVTTD87lUfO5ZCwhGWT8R/Au2w+7jjwZQs6INmOi25EGdArHqp6hc4Gh7MsJK0S0kkUHuOzXggpHiVEVlCrNjAZqS8UQk7lOI+gh2z0spuw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB6280.namprd12.prod.outlook.com (2603:10b6:8:a2::11) by DM4PR12MB5104.namprd12.prod.outlook.com (2603:10b6:5:393::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Thu, 5 Jan 2023 20:07:08 +0000 Received: from DM4PR12MB6280.namprd12.prod.outlook.com ([fe80::5935:7d8d:e955:6298]) by DM4PR12MB6280.namprd12.prod.outlook.com ([fe80::5935:7d8d:e955:6298%7]) with mapi id 15.20.5944.019; Thu, 5 Jan 2023 20:07:08 +0000 Message-ID: <7f7177c3-c6e1-81b8-2599-0d24245b416d@amd.com> Date: Thu, 5 Jan 2023 15:07:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2] drm/amd/display: fix PSR-SU/DSC interoperability support To: Harry Wentland , amd-gfx@lists.freedesktop.org Cc: Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , David Zhang , Nicholas Kazlauskas , Alex Hung , Po Ting Chen , Shirish S , Robin Chen , Brian Chang , Camille Cho , Tom Chung , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20230105173809.289367-1-hamza.mahfooz@amd.com> <161a2a64-6bdc-c896-1e3f-56da76f03b21@amd.com> Content-Language: en-US From: Hamza Mahfooz In-Reply-To: <161a2a64-6bdc-c896-1e3f-56da76f03b21@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: YT1PR01CA0110.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2c::19) To DM4PR12MB6280.namprd12.prod.outlook.com (2603:10b6:8:a2::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB6280:EE_|DM4PR12MB5104:EE_ X-MS-Office365-Filtering-Correlation-Id: 11b20560-5938-470f-97fe-08daef586c3d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5zJ/bTeNdwYRpfNiTQ1JP7Lfi7Fd0+638q7ySIXe5rv2giXjZt52i+buQ4PKhHHZ/0Xm55I9a/502uhvqaQAF5Wh4LojLdb5yb4oz4FM+kgHTtWZeU3rx7j9G9r0F5GfoSmMoEeH/iZIdpKe71qpafrfIUz3rh4SIl1BQ6ExiLoiqMFdofsKq2stpgZ657ITirNvAYXj0KLdX2vBOqmO0cwCD8UrkTbm0v0LOYVwOlhoqxaokJkralrbUX1ZLolRLfjbKYk05dNK8+LdzIRJZFTd/TmrxYWahVDhLJx+8FOU2QQn/hM1KvxH1mppMaR85v9utWLk7PmKONWaoGP74oXxetXN+2MJzcIaAJ2lN8T6UASfBIRtmU0LqzHkqsaYrueBcOi0jnMRewRAFHKtvuFRJI84ZgnLuYZX06asMK1vJ79OjmLUY4JDdXcxHFK3iDHDZRZ20NBof5l5+nnOZxHaqFNK6ImtfLBU6fezcYOL6bHcsgEFvRcEezWXS6rkga7c944KVZNSrdAJsbgAkZBz2RvK1dgL2NQuDtgSld0VPZ6bkg/HHrG7ZoXJmTc8X2wz6YFSq/dy3kZdPj64dSDQ7AZIY38+T3aA59NmW9yeJuDOA7AeWlkOG1jNS/FROgIZvRK2evZ6+1czDgxnhMZLwXQuTbMUosrdgobgdPDcZGj2k2hE36p404gg2lPuLQzGITarKB4zE6Qy2byehNCpvlb/yIGUIJgYp/sT8jM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB6280.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(39860400002)(346002)(396003)(376002)(136003)(451199015)(66476007)(4326008)(2616005)(66946007)(36756003)(8676002)(41300700001)(66556008)(54906003)(316002)(31696002)(2906002)(86362001)(5660300002)(38100700002)(83380400001)(8936002)(44832011)(6506007)(478600001)(53546011)(26005)(6666004)(6512007)(186003)(6486002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NFc1R3lEbklCbFhpUTFjSXhXYmM4RHdCL2FtTVdzYlcwajF1dDVoREVKZXBC?= =?utf-8?B?R0NJbms5WUFmb0ErUi9hd0ZOVmJ4aXhFbEpUWG10c3haNFRwaUh2c0NRSHhi?= =?utf-8?B?ZUZmbG9ZdTBZOU5LSE1Malh6b0ExMllBRS95VTQxOWpTd1NkSW94QWhFa1lr?= =?utf-8?B?ODRGTWNWK08ySmdXN2FkczNCNHdTaWpEWEpjT1ZLRzliMjdteDRUaXBLK3FY?= =?utf-8?B?dlphdDRLbGpaZGpXK0F1L3hMZGdIQVNiZXV6NDliZUFRYUxoVlBXdVFOMyt6?= =?utf-8?B?dFJ5bms5aVlqd1hEWnVUZ2hyODFnNnQ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8?Q?1MWWiRYzeibKRpI2+B4jWqS12?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11b20560-5938-470f-97fe-08daef586c3d X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB6280.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2023 20:07:08.0357 (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: njipCaLQ5sW2HQaeMDncmBCVYw02apiDMuz3NANWbjFxOGxsF9jmrcPrvcOog1FjseC+NYA3nc7SVKd6JtczdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5104 X-Spam-Status: No, score=-5.0 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 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 1/5/23 13:29, Harry Wentland wrote: > > > On 1/5/23 12:38, Hamza Mahfooz wrote: >> Currently, there are issues with enabling PSR-SU + DSC. This stems from >> the fact that DSC imposes a slice height on transmitted video data and >> we are not conforming to that slice height in PSR-SU regions. So, pass >> slice_height into su_y_granularity to feed the DSC slice height into >> PSR-SU code. >> >> Signed-off-by: Hamza Mahfooz >> --- >> v2: move code to modules/power. >> --- >> .../drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++ >> .../amd/display/modules/power/power_helpers.c | 35 +++++++++++++++++++ >> .../amd/display/modules/power/power_helpers.h | 3 ++ >> 3 files changed, 41 insertions(+) >> >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c >> index 26291db0a3cf..872d06fe1436 100644 >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c >> @@ -122,6 +122,9 @@ bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream) >> psr_config.allow_multi_disp_optimizations = >> (amdgpu_dc_feature_mask & DC_PSR_ALLOW_MULTI_DISP_OPT); >> >> + if (!psr_su_set_y_granularity(dc, link, stream, &psr_config)) >> + return false; >> + >> ret = dc_link_setup_psr(link, stream, &psr_config, &psr_context); >> >> } >> diff --git a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c >> index 9b5d9b2c9a6a..4d27ad9f7370 100644 >> --- a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c >> +++ b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c >> @@ -916,3 +916,38 @@ bool mod_power_only_edp(const struct dc_state *context, const struct dc_stream_s >> { >> return context && context->stream_count == 1 && dc_is_embedded_signal(stream->signal); >> } >> + >> +bool psr_su_set_y_granularity(struct dc *dc, struct dc_link *link, >> + struct dc_stream_state *stream, >> + struct psr_config *config) >> +{ >> + uint16_t pic_height; >> + uint8_t slice_height; >> + >> + if (!dc->caps.edp_dsc_support || >> + link->panel_config.dsc.disable_dsc_edp || >> + !link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT || >> + !stream->timing.dsc_cfg.num_slices_v) > > I'm not sure this condition is correct. We can have DSC but not eDP DSC > support. > AFAIK PSR-SU displays use eDP exclusively, so we shouldn't have to worry about this case. >> + return true; >> + >> + pic_height = stream->timing.v_addressable + >> + stream->timing.v_border_top + stream->timing.v_border_bottom; >> + slice_height = pic_height / stream->timing.dsc_cfg.num_slices_v; >> + >> + if (slice_height) { >> + if (config->su_y_granularity && >> + (slice_height % config->su_y_granularity)) { >> + WARN(1, > > We don't use WARN in display/dc or display/modules. DC_LOG_WARNING > might be better, or log it in the caller. > > Harry > >> + "%s: dsc: %d, slice_height: %d, num_slices_v: %d\n", >> + __func__, >> + stream->sink->dsc_caps.dsc_dec_caps.is_dsc_supported, >> + slice_height, >> + stream->timing.dsc_cfg.num_slices_v); >> + return false; >> + } >> + >> + config->su_y_granularity = slice_height; >> + } >> + >> + return true; >> +} >> diff --git a/drivers/gpu/drm/amd/display/modules/power/power_helpers.h b/drivers/gpu/drm/amd/display/modules/power/power_helpers.h >> index 316452e9dbc9..bb16b37b83da 100644 >> --- a/drivers/gpu/drm/amd/display/modules/power/power_helpers.h >> +++ b/drivers/gpu/drm/amd/display/modules/power/power_helpers.h >> @@ -59,4 +59,7 @@ void mod_power_calc_psr_configs(struct psr_config *psr_config, >> const struct dc_stream_state *stream); >> bool mod_power_only_edp(const struct dc_state *context, >> const struct dc_stream_state *stream); >> +bool psr_su_set_y_granularity(struct dc *dc, struct dc_link *link, >> + struct dc_stream_state *stream, >> + struct psr_config *config); >> #endif /* MODULES_POWER_POWER_HELPERS_H_ */ > -- Hamza