From patchwork Tue Nov 12 07:53:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Lin, Wayne" X-Patchwork-Id: 11238785 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EA19213B1 for ; Tue, 12 Nov 2019 07:53:54 +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 D110621872 for ; Tue, 12 Nov 2019 07:53:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D110621872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com 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 6D67B6E37F; Tue, 12 Nov 2019 07:53:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-eopbgr800079.outbound.protection.outlook.com [40.107.80.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id B886E6E314; Tue, 12 Nov 2019 07:53:50 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iCU6kXQ8RaEzbu4sbcIARDaW6R8DOTTg9AikYX9/pFWWA3f2arGyzlGex7eXz0gxu5/VLzzLU9fDOQD9q+GMUeO9Fcud0VT5bMI2trykdrYdc0/ZUhUCkZ1Jxgf4mb0+qHyDiSuJ0FlvKG4DZ1v2JgRUbUuGEuXaZP8vrJ/8v4NTip20yZJDaMby/w1FZFr83WjOAbUO4q9vBQjjpu8tH3RC19di37BqpSLYdL3fnXVMnTv0sJCHjhAe5Y0qGYS1BWoghou49+h/iKtmmNbvHnR0PIdjq041p1uwMPBmYNhDaK/g0DNXKjdAT9EciwIWloCAvHE7F9hVNN4lRDW80A== 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-SenderADCheck; bh=lDtenDwDmNTRF7IlGIZTm2cVrNe1NfBt1Ug4iJ58ZtU=; b=MVgW29vfmCSp4cwVSAP4Fo4weGKVvf0Wmr9OBvnVL3NpkXPrioNXN/IGVjim2eZYN09iY//BIb4mJPe9lTCWo32y81eh8dkYMEek1GGdgau3MCINXkq7v8K6uEDj5bnRQm29yq6sp6eAN/mFrW1PIddEwgMASuyp76H+ai47bhnfBfQOtw/Y6dwiAKV1oqhoaXNhfYBfZPb4R2HV9xcRY4ruhcbVpqhDvZGcY6HNFSGvWdL/KD5QLJuUN3Dp8mh+uy+zafDVAQtgRSNvsYb5DagqD0KRff1CVEJU4NL5TIspe/jcmoI77mJHb6EmlDsQsWCc/dF6ux6L3+8FjwgE3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none Received: from BN6PR1201CA0012.namprd12.prod.outlook.com (2603:10b6:405:4c::22) by CY4PR1201MB2468.namprd12.prod.outlook.com (2603:10b6:903:d7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.24; Tue, 12 Nov 2019 07:53:49 +0000 Received: from CO1NAM03FT029.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::201) by BN6PR1201CA0012.outlook.office365.com (2603:10b6:405:4c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20 via Frontend Transport; Tue, 12 Nov 2019 07:53:48 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB01.amd.com (165.204.84.17) by CO1NAM03FT029.mail.protection.outlook.com (10.152.80.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2430.20 via Frontend Transport; Tue, 12 Nov 2019 07:53:48 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 12 Nov 2019 01:53:47 -0600 Received: from wayne-System-Product-Name.amd.com (10.180.168.240) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Tue, 12 Nov 2019 01:53:45 -0600 From: Wayne Lin To: , Subject: [PATCH 1/2] drm/edid: Add aspect ratios to HDMI 4K modes Date: Tue, 12 Nov 2019 15:53:06 +0800 Message-ID: <20191112075307.12574-1-Wayne.Lin@amd.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(346002)(39860400002)(396003)(376002)(428003)(199004)(189003)(186003)(426003)(6306002)(110136005)(336012)(50466002)(316002)(54906003)(4326008)(53416004)(70586007)(70206006)(305945005)(126002)(476003)(2616005)(26005)(486006)(5820100001)(2870700001)(6666004)(356004)(966005)(478600001)(8676002)(86362001)(36756003)(7696005)(23676004)(50226002)(47776003)(2906002)(81156014)(8936002)(81166006)(5660300002)(1076003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB2468; H:SATLEXMB01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ca46c3c-b17b-4dae-3269-08d767457368 X-MS-TrafficTypeDiagnostic: CY4PR1201MB2468: X-MS-Exchange-PUrlCount: 1 X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 021975AE46 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o0ln9Pt9+2duqbEmNYAS65rZg9QPyTXxB7kOU09RmWCKdzBKf0+05WE+X2wILM+vGcFRtTz1Mt6MoZk7/10wB2GoKjb4V3iRKOGFgVD342BMQWlt6h/JkK8zj1uQc0/oXhw0UkOU8n6PjXRBsfQlU8cZsHBZg9T6vK5Dt9XHM1AIuspk/9T3WpLt7It9O2Xi9E25T0pNQny5gYssvNfI9FG4KU3rcUwJx4p+FGvneDsRKp1OvYc4N2imT+w87n154B2GVig1kgm+E2FGPyGyTBOlpPpCDZGG+PfTEajfJXWOJOk13YzifC0dD2iibjwOQhPZcN8mnJRhlmiN+7y9RcVLjrfki/IyJ3xCS+1jTZCfrwO37UTyKiPV2AxB25oeQjipUVekdPIwppfU3NuCFaLcAFFgy6GWVZl9fdh8fQ7bFe48l/JYBsrZu/aAyiCjSfWyVKKeXBT2rd1iUni33Oi/Sxi6lHxe9aaazEEPIbo= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2019 07:53:48.1216 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ca46c3c-b17b-4dae-3269-08d767457368 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=[SATLEXMB01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB2468 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lDtenDwDmNTRF7IlGIZTm2cVrNe1NfBt1Ug4iJ58ZtU=; b=O5gkWK6WKOOjqe3klU3XCuQTtHW8zRoWA5+lBtElU3OAKgnWXzvaG0pcO4yc/IxrWXx2pG0AQyJOIXs819elUuILPKg3A/6qdaBvmhx4+isz8f0+6ewnJgfFLkovanWrI6e3JXNYpq/6eDwaoabLEIRthhWgsyAHNhqShzTL5Uw= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wayne Lin Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" [Why] HDMI 2.0 adds aspect ratio attribute to distinguish different 4k modes. According to Appendix E of HDMI 2.0 spec, source should use VSIF to indicate video mode only when the mode is one defined in HDMI 1.4b 4K modes. Otherwise, use AVI infoframes to convey VIC. Current code doesn't take aspect ratio into consideration while constructing avi infoframe. Should modify that. [How] Inherit Ville Syrjälä's work "drm/edid: Prep for HDMI VIC aspect ratio" at https://patchwork.kernel.org/patch/11174639/ Add picture_aspect_ratio attributes to edid_4k_modes[] and construct VIC and HDMI_VIC by taking aspect ratio into consideration. Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_edid.c | 45 +++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 77a39fc76045..fcd7ae29049d 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1288,25 +1288,25 @@ static const struct drm_display_mode edid_4k_modes[] = { 3840, 4016, 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), - .vrefresh = 30, }, + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* 2 - 3840x2160@25Hz */ { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), - .vrefresh = 25, }, + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* 3 - 3840x2160@24Hz */ { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), - .vrefresh = 24, }, + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* 4 - 4096x2160@24Hz (SMPTE) */ { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), - .vrefresh = 24, }, + .vrefresh = 24, HDMI_PICTURE_ASPECT_256_135}, }; /*** DDC fetch and block validation ***/ @@ -3110,6 +3110,11 @@ static enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code) return edid_cea_modes[video_code].picture_aspect_ratio; } +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8 video_code) +{ + return edid_4k_modes[video_code].picture_aspect_ratio; +} + /* * Calculate the alternate clock for HDMI modes (those from the HDMI vendor * specific block). @@ -3136,6 +3141,9 @@ static u8 drm_match_hdmi_mode_clock_tolerance(const struct drm_display_mode *to_ if (!to_match->clock) return 0; + if (to_match->picture_aspect_ratio) + match_flags |= DRM_MODE_MATCH_ASPECT_RATIO; + for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) { const struct drm_display_mode *hdmi_mode = &edid_4k_modes[vic]; unsigned int clock1, clock2; @@ -3171,6 +3179,9 @@ static u8 drm_match_hdmi_mode(const struct drm_display_mode *to_match) if (!to_match->clock) return 0; + if (to_match->picture_aspect_ratio) + match_flags |= DRM_MODE_MATCH_ASPECT_RATIO; + for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) { const struct drm_display_mode *hdmi_mode = &edid_4k_modes[vic]; unsigned int clock1, clock2; @@ -5118,6 +5129,7 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame, const struct drm_display_mode *mode) { enum hdmi_picture_aspect picture_aspect; + u8 vic, hdmi_vic; int err; if (!frame || !mode) @@ -5130,7 +5142,8 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame, if (mode->flags & DRM_MODE_FLAG_DBLCLK) frame->pixel_repeat = 1; - frame->video_code = drm_mode_cea_vic(connector, mode); + vic = drm_mode_cea_vic(connector, mode); + hdmi_vic = drm_mode_hdmi_vic(connector, mode); frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE; @@ -5144,11 +5157,15 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame, /* * Populate picture aspect ratio from either - * user input (if specified) or from the CEA mode list. + * user input (if specified) or from the CEA/HDMI mode lists. */ picture_aspect = mode->picture_aspect_ratio; - if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) - picture_aspect = drm_get_cea_aspect_ratio(frame->video_code); + if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) { + if (vic) + picture_aspect = drm_get_cea_aspect_ratio(vic); + else if (hdmi_vic) + picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic); + } /* * The infoframe can't convey anything but none, 4:3 @@ -5156,12 +5173,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame, * we can only satisfy it by specifying the right VIC. */ if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) { - if (picture_aspect != - drm_get_cea_aspect_ratio(frame->video_code)) + if (vic) { + if (picture_aspect != drm_get_cea_aspect_ratio(vic)) + return -EINVAL; + } else if (hdmi_vic) { + if (picture_aspect != drm_get_hdmi_aspect_ratio(hdmi_vic)) + return -EINVAL; + } else { return -EINVAL; + } + picture_aspect = HDMI_PICTURE_ASPECT_NONE; } + frame->video_code = vic; frame->picture_aspect = picture_aspect; frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE; frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN; From patchwork Tue Nov 12 07:53:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Wayne" X-Patchwork-Id: 11238787 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1248214ED for ; Tue, 12 Nov 2019 07:54:00 +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 ED7C421872 for ; Tue, 12 Nov 2019 07:53:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED7C421872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com 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 3A66D6EA5B; Tue, 12 Nov 2019 07:53:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730044.outbound.protection.outlook.com [40.107.73.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A5696EA5B; Tue, 12 Nov 2019 07:53:58 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cmTTgfMnFsHtXnpJQ6kMgjzh6MEtkgo9hNSFjMyqdSKI6KQFNTjdE/D5E6x35nhsKTS7CStBfA2BQcny0T7cBXDnE/94w7Vt0Je3xLDjcftD3WCpjaxcWu8I46JbnShgbUG/nJQ3xV8x+RVP0kIhqA/xaqYhAO751fEJm8KpKkjnbXIaHGlycwj+XM8MKLWlXu7qb8wpOh+DIaJ8Y/9+wIVlVWyScpo3AbD085ViUia31rodcRE0+uLEM2lFI9IrE7GrxgsrLhUmNNjZMRKunqWR+I4zv7p2cce9KoUYLVpeEUrUxReHhCvX5vWyRF5wj6zYL74M/GhUChTYHWXZXA== 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-SenderADCheck; bh=u81Sa04Nv3OsU91I799dEuFjky5nz8wfKX/gMLK08sw=; b=fcB0MBBIHOEloGhdhwYzRJaWe6LROhn7TOFmKJFdU4jP8bngWBfU8oWebOgbQsITXoujtNhTx3As5kSKmpFC4rEPrnJMhk223JSba5lEAkANQbWMz4w6UrEuqI6BkO89K2ZvoWg6UUIdRFM2nhE12QaJPgq1wu+DeRigrfpb5Kn2cmVxVblO9a9b6xfWrxpjjyusRhEmhw027C6mVpZwIIYYE+LMpVc2q8bAJCmSyxlnmDUUjSZ0J+dAduXoH3QVjTAxCKip606dd9MhVyE+D1BvoVeE01vwdghpEwMwGaRjzxUl3nmoyA+DiU/3dHPVllqW89IeQQqk/SYrYBwY4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none Received: from DM5PR12CA0068.namprd12.prod.outlook.com (2603:10b6:3:103::30) by BYAPR12MB3318.namprd12.prod.outlook.com (2603:10b6:a03:df::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.24; Tue, 12 Nov 2019 07:53:56 +0000 Received: from CO1NAM03FT014.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::200) by DM5PR12CA0068.outlook.office365.com (2603:10b6:3:103::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.22 via Frontend Transport; Tue, 12 Nov 2019 07:53:56 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB01.amd.com (165.204.84.17) by CO1NAM03FT014.mail.protection.outlook.com (10.152.80.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2430.20 via Frontend Transport; Tue, 12 Nov 2019 07:53:55 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 12 Nov 2019 01:53:54 -0600 Received: from wayne-System-Product-Name.amd.com (10.180.168.240) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Tue, 12 Nov 2019 01:53:52 -0600 From: Wayne Lin To: , Subject: [PATCH 2/2] drm/edid: Add alternate clock for SMPTE 4K Date: Tue, 12 Nov 2019 15:53:07 +0800 Message-ID: <20191112075307.12574-2-Wayne.Lin@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191112075307.12574-1-Wayne.Lin@amd.com> References: <20191112075307.12574-1-Wayne.Lin@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(136003)(39860400002)(396003)(428003)(189003)(199004)(110136005)(26005)(54906003)(478600001)(356004)(6666004)(86362001)(53416004)(48376002)(36756003)(50466002)(186003)(316002)(2906002)(47776003)(305945005)(70206006)(126002)(70586007)(50226002)(486006)(2616005)(476003)(4744005)(8676002)(446003)(81156014)(336012)(8936002)(81166006)(4326008)(426003)(7696005)(76176011)(11346002)(16586007)(1076003)(51416003)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB3318; H:SATLEXMB01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c80ef3c-9ff2-4d50-6cba-08d76745780a X-MS-TrafficTypeDiagnostic: BYAPR12MB3318: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 021975AE46 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YdSBzdyROXbCobAFzxSI9W6pJDyPfOPW/j2xv/XJo/+8rWiq8x84mD9SFo6juEeKHncGDH9RwbVFyviUqi4etWyyYhDXpnDCey17gC1K8UFtqErrzWyDFsWPmVPQke1A8Tx2Vj+HRkPDSII2MUbwySUBUsycAWz2biRT1vwszAN2r6jOtxnOTElhV5U1FFV4awaOsOnw1ve3rs5wSR0FhXI7j6ZjlYpZehT9+08YveGeFzgIVu8gB9bUNxss3Gq/nwqc8Pl6ZcZswIfRpR+hkyFdRdbyOY84eLBOZVhSZE4cxjowUGG1zSE+3Fzq+azT/0jCf5KhlCYRO9bBG6cS+SIRGZ2rwjplTJtiCtFX96sS9Am/IiNlfo76ABCMTpH19yiWPxJMUyoHVH7sRCP3uOVET7VNI8c23cSPPYDFopZpKf0uJ9ZU4pMTmJlWqzDO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2019 07:53:55.8986 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c80ef3c-9ff2-4d50-6cba-08d76745780a 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=[SATLEXMB01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3318 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u81Sa04Nv3OsU91I799dEuFjky5nz8wfKX/gMLK08sw=; b=jlDEkXrbPLh0SZMQVW8loEU47WA+cDJsa/f/1IZ6JCIieeRIrY1wsB+k5qy7dqhhaW1VwNUTtCu+t/OewjqnabAez0kD8Y1alF6zViFZfAGPYa6yT0zsAEsSR4+hfQN6jqt2rG4AYYQoSAk4uixwcftclzDLAchz7vRqYTty3YU= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wayne Lin Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" [Why] In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode (4096x2160@24) due to there is no alternate clock defined for that mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. [How] Remove the exception Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_edid.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index fcd7ae29049d..ed2782c53a93 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -3126,9 +3126,6 @@ static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8 video_code) static unsigned int hdmi_mode_alternate_clock(const struct drm_display_mode *hdmi_mode) { - if (hdmi_mode->vdisplay == 4096 && hdmi_mode->hdisplay == 2160) - return hdmi_mode->clock; - return cea_mode_alternate_clock(hdmi_mode); }