Message ID | 20230120173226.98569-1-hamza.mahfooz@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp331045wrn; Fri, 20 Jan 2023 09:33:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXuYMUHxjrnRLfw2OCsHLafI/QJBTkaR0maksR4GZmMmQ1g8AuZUDeENDNQ+Iem4y2NvkLBo X-Received: by 2002:a17:903:32c8:b0:194:58e0:488b with SMTP id i8-20020a17090332c800b0019458e0488bmr21863700plr.30.1674235984232; Fri, 20 Jan 2023 09:33:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674235984; cv=pass; d=google.com; s=arc-20160816; b=oc3TVYMnX6oUZ0SBhOwd/OaN54qeZ9m3nOtMEgscD2qv28zn13Ev+dAhoCA8bomosq NJz8tzkzPhJkctHUwjxelo2EdVBrfKGvfBk8PndbxvA4yRePvJ5S+4mg9PBQ3wmlGFB1 I6MZIiu2YRo/LoHNtmjGG3xkbUR+ZRnXMqM4In4Fiq4h2IL959ExbQJQdgqlJynpt2j5 +9r9VQm8jtOv0zq6R1I34+KLGxIc+21wQqACS2aOY24tyDI/xDLmEQojs+HER4T8Gab9 em+mpNy3sC52YpY1fHoZuz9ZdJTnxdG62emqgK0x4yBWy1YYAUwIs+of0/zTiBuxW+/z FcWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1UaUlVHi9t0u9oFk/h5G2dJi5oO6zN5KYpcCNzQnFns=; b=pCs1w7jz9Uw12XozsL3cRKPp3g42rHVUG2PyDMv3gkvpJgNqX+nvCXm8oEqbsXi27V lPu95Caj1blxyZENOYd/Mp6ONWtJQasZOfk+2YPddcl/8ciHsSBOgwo4ySiN6AwDoUa/ DYB6xNTNA6uxpxS59pHBiQKuHmySq7mByjUQnAaOC6+ZtDC7EAuHNtm+Ypj8onTZ1jJI 9rUuBgXxMac0y279cYbeUlV0nkmHwaBffKBFfWRahE2lVThVEpd2rTew4ymnn9uVx0Cz dmaWSbttnLpOBfEbbRZBCpNpev3mGaS9ZL3m425b8I1dchoqy/tHehnwTaloimA+gj3k a6WQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=r4dRhdTA; arc=pass (i=1 spf=pass spfdomain=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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a170902ce8800b00194943a9f73si16404359plg.398.2023.01.20.09.32.51; Fri, 20 Jan 2023 09:33:04 -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=r4dRhdTA; arc=pass (i=1 spf=pass spfdomain=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 S229879AbjATRc1 (ORCPT <rfc822;forouhar.linux@gmail.com> + 99 others); Fri, 20 Jan 2023 12:32:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbjATRcZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 20 Jan 2023 12:32:25 -0500 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2080.outbound.protection.outlook.com [40.107.100.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 793B36FD07 for <linux-kernel@vger.kernel.org>; Fri, 20 Jan 2023 09:31:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VnjE3zo9LyA+hl0fDjQerf0OTwPydaohXjmHzSQseFgyz8XpIrvFL0BU57+I4j3+RmeZtRZcygKo//uXQ/4zFSh/YzrchWzCrTV8zFP2iPG+EOR8s/LFELyapstDoXgeO+oQEW9gTVJ8gH5Iv7znGFVmtyF5S+r2MKtyx7dgCF1RE/aCIwiyqDXRhXVG0qHIWys+Hwr81zSpz+J0q/Z8BYE5++7VgO7TffwgxD9voON0aEBeWeDWk8XLNrtlCrtdlV6TVlAvQc52YHpEclsO7SVHHED7P3nMmMpAXgKAc1ZDWpGPVPe5DjxABIcfFYzjDLt9VXnMoaJI0Gzuz1w7vw== 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=1UaUlVHi9t0u9oFk/h5G2dJi5oO6zN5KYpcCNzQnFns=; b=BCxBKoERGhxKxiGQTvCyfsDvxpWdSQ+w08Pyupx9QbgPZ7rjSiiXY4MHJr0R3o7dWeRUq8XXu3WnCOV4vHUv45nsXBPQVZsXtjQ9IQM9l3bLRLm1qVyGgsm+Xlvzg/ZwdRzvC/pAFLuFdbUsNQGdcav0+u7I+fON3FGeT4F1UTkZqqD4ZdijvKIqDtOZC0DPSeOVgyOMYMoMP+7mJAZ+uwmnMCs+abRi/Ryu5R7l0D/+NSILup7xQPE1MxQky6FFP4w0WHLzE1tgDbz1QZJYk60ugCd2ki6ultVR3Jls34RDSILKSPcAOOvBjDnQ3HsdDCU7PFeD5GvaBGF4X3QiKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=1UaUlVHi9t0u9oFk/h5G2dJi5oO6zN5KYpcCNzQnFns=; b=r4dRhdTAymOD5wYjNNKY3PVonzSA/B939lsj62MoALZQBEwOKrMEMIw4KXzplaUyWA72iphZQkjhvszlBdLlVuwEhkC5Qm9LxoQUGAX1i9E+HsaxSknY2kP9oGb0jhWXrQhfr8rPA0+Srg/Yw/b2qcKh6atL/qTPMKOCg4eQTVg= Received: from BN9PR03CA0168.namprd03.prod.outlook.com (2603:10b6:408:f4::23) by DM4PR12MB7741.namprd12.prod.outlook.com (2603:10b6:8:103::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Fri, 20 Jan 2023 17:31:46 +0000 Received: from BN8NAM11FT074.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f4:cafe::1b) by BN9PR03CA0168.outlook.office365.com (2603:10b6:408:f4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.27 via Frontend Transport; Fri, 20 Jan 2023 17:31:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT074.mail.protection.outlook.com (10.13.176.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6023.16 via Frontend Transport; Fri, 20 Jan 2023 17:31:45 +0000 Received: from hamza-pc.localhost (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 20 Jan 2023 11:31:43 -0600 From: Hamza Mahfooz <hamza.mahfooz@amd.com> To: <amd-gfx@lists.freedesktop.org> CC: Hamza Mahfooz <hamza.mahfooz@amd.com>, Wenjing Liu <wenjing.liu@amd.com>, Harry Wentland <harry.wentland@amd.com>, Leo Li <sunpeng.li@amd.com>, "Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>, Alex Deucher <alexander.deucher@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, "Pan, Xinhui" <Xinhui.Pan@amd.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Arnd Bergmann <arnd@arndb.de>, <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH] drm/amd/display: use a more appropriate return value in dp_retrieve_lttpr_cap() Date: Fri, 20 Jan 2023 12:32:23 -0500 Message-ID: <20230120173226.98569-1-hamza.mahfooz@amd.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT074:EE_|DM4PR12MB7741:EE_ X-MS-Office365-Filtering-Correlation-Id: 77d5ffcd-5b88-4624-165f-08dafb0c3405 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Nr1dzFOGMJQRyzkC/kMAcDjeh0cldPF0X+AE472sPcy5Nx4w6tKniXa3dC3S42KSttRsGEjz4ffgow33vA2wTNn9oisCkRuPcSTtzQoCMqgJDRxT+1Uu9iFw5qkGC9YA2MAyd0ORKcqivm6tCTSdNALG7njDE7jTTZD6i4wQdSxIuI8KH7lNxcp90UClqDkBZ/BrkMIdg5jgBhY4Vn5HaHhMQNYBCxq1RxD32TBEJSnHAcgaxzVfa6pN5CokF5dOdShIBNwplAAyv/fcr6wDhMrOcbxCkDIrjC4+MUJy0PAm7qxwjCq569d6fhgHcJgrLAXYtP7bZ+jYBhOQx15D5LdsxAEujKzI0betULrupyh6BYJktTl/3yroVhVK88EluYiUmJafEOi6+aImNPdSOgC2QgG6M7t2k6xBdnbZG2P8giUiA1rJKGJ2ENJLyQl+4g6PAGIfnTeUSO8EMnDC7cytpTaHi0GPH4FzkaK8LoPfofmvhwDgYCBwfdqM7qqZlLkYsSV2WfqokDjzEdW8/hA+hS6z643GNIfowDQ7MqcAKvZd4FF+VDvA6uT2R4Y6ZRdD/PcE7TA4qhdyvRJxA5HKZ2ekSjnmk49ImVmJ2O+NPes/tEn0GZcmghbkjxWf6KM6Id+EuLWWv9aiiWnpzj8fqmKXPTOiDlhH8llYEKa57Wy/ENo0DOsvg/XTMBtHnQDhQOG9mek+XexejRk9p2ILHV0fDNPsr9B2QTBNOeBllPb5iGtR80IxXyzJpOghiZnH8uP/tZOs5knwYGEPeQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(136003)(396003)(346002)(376002)(451199015)(46966006)(36840700001)(40470700004)(83380400001)(36860700001)(82740400003)(81166007)(70586007)(6916009)(5660300002)(44832011)(356005)(4326008)(8936002)(2906002)(70206006)(1076003)(82310400005)(86362001)(426003)(478600001)(40480700001)(336012)(16526019)(186003)(26005)(2616005)(41300700001)(54906003)(40460700003)(8676002)(316002)(6666004)(47076005)(36756003)(16060500005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2023 17:31:45.6805 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77d5ffcd-5b88-4624-165f-08dafb0c3405 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT074.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7741 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755563671306736429?= X-GMAIL-MSGID: =?utf-8?q?1755563671306736429?= |
Series |
drm/amd/display: use a more appropriate return value in dp_retrieve_lttpr_cap()
|
|
Commit Message
Hamza Mahfooz
Jan. 20, 2023, 5:32 p.m. UTC
Not all ASICs support LTTPR, however if they don't it doesn't mean that we have encountered unexpected behaviour. So, use DC_NOT_SUPPORTED instead of DC_ERROR_UNEXPECTED. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> --- drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Acked-by: Alex Deucher <alexander.deucher@amd.com> On Fri, Jan 20, 2023 at 12:31 PM Hamza Mahfooz <hamza.mahfooz@amd.com> wrote: > > Not all ASICs support LTTPR, however if they don't it doesn't mean that > we have encountered unexpected behaviour. So, use DC_NOT_SUPPORTED > instead of DC_ERROR_UNEXPECTED. > > Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> > Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> > --- > drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c > index e72ad1b8330f..21fd9275ae4c 100644 > --- a/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c > +++ b/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c > @@ -1462,7 +1462,7 @@ enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link) > bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware; > > if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_support) > - return DC_ERROR_UNEXPECTED; > + return DC_NOT_SUPPORTED; > > /* By reading LTTPR capability, RX assumes that we will enable > * LTTPR extended aux timeout if LTTPR is present. > -- > 2.39.0 >
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c index e72ad1b8330f..21fd9275ae4c 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c @@ -1462,7 +1462,7 @@ enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link) bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware; if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_support) - return DC_ERROR_UNEXPECTED; + return DC_NOT_SUPPORTED; /* By reading LTTPR capability, RX assumes that we will enable * LTTPR extended aux timeout if LTTPR is present.