Received: by 2002:ac8:6216:0:b0:41c:c224:f26f with SMTP id ks22csp77622qtb; Thu, 2 Nov 2023 12:02:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGcZhnVivxCLkugserjmlHg5FklWJ3nSkI/7Cs0/jIcC07bSNiAi9y3FqBY/lY6En+9qNI3 X-Received: by 2002:a17:902:e0c5:b0:1cb:dc81:379a with SMTP id e5-20020a170902e0c500b001cbdc81379amr15066803pla.53.1698951776583; Thu, 02 Nov 2023 12:02:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698951776; cv=pass; d=google.com; s=arc-20160816; b=NNkoOwNQfVS2tVdhi2aSdwoO3HzJ/3bH0kI94FPCXxkHWj5Ki6aWxsCE2WOEs5M/+y eDf1qYDF8egFymklvlGco/vOL7hppgiRYPiVv2WrpMR1it+A30vQL109KVhRUXeyA/31 wOZz/jaNx6WXxHnOg7KmdqLOcIdN1h9lD3R6hnoWL8Y5klgP7d/YgElpgX43t/loge/b FKzQnldb/tiLALuqcx+ggWacRdn8OwJJA+f0vLVLIE6KncNkE2JHe/awWP8+0STV7f0q Iwy/7QNYvwR2TtJ6zv/MYP/iGZVvPDOtT9l6+fgHdUZjWb7A6n77/g+9zi0oyzRYMGFR c2lg== 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=c5Y28Wm2wIfxhJiYkMWDWW/VzW7YYYLCesct4WDAwPA=; fh=QzYMWyt95r1KqqIn3dlYexpMgDftu08n3KJiiJifQpA=; b=tZnq+hkoF1SdApMFzuvNz2QBr2y0kTIzo2AaUc9xn5mBBjTW7BEqtQ7VHtwW1MwGPe SztoNvaFMBckLqLrP7toww5hnifUveZbBk/gXJYHE9pNhrWB5oD1WnfN0IzQB3wRtAb6 1DIZJLvdApuDJNCmcelws4Z5A1IDohzFtozBI/E7UHnvSDOFVq7tTRVbyjZ3eDXCCNqU XLYrUKLaJHTEUXsd4ykK8WHyTGvJWwCoMk3I905ibG9XMRUC6Tq0mdJpO729P+xJ2aAV hzcKrT9GdveQS7otBljx5C7HWWZ0pkyVxD2Uc9/HSrj0ZQfXwkiZbALc+PcMU+kff0YK tCJA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=5clJhTyx; 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::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id l2-20020a170902f68200b001b8c6890612si117687plg.594.2023.11.02.12.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 12:02:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=5clJhTyx; 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::3:7 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6ACD2804C6EC; Thu, 2 Nov 2023 12:01:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377412AbjKBTBJ (ORCPT + 99 others); Thu, 2 Nov 2023 15:01:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377374AbjKBTAz (ORCPT ); Thu, 2 Nov 2023 15:00:55 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2062.outbound.protection.outlook.com [40.107.94.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AFB0184; Thu, 2 Nov 2023 12:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DPwLF0tGRg+qpRP6tlQaPTMfFsbWgOmM5HI30t7UJia8k7J2KWLuLXIDhNr4EVgcVnaycJM6CQoLpyR6ro+HnWpkySAppf7hXrDdl52zwMS25ngQR81yYttuJNkSlpnVB9Etkb9/at3AxnAbgENDnV5kp2O8/QceeFbP8jt6ZwiHTak1lwjWxeCW4WN84Jtd4xZN0EKUDd3zeNqcsoDRVQ+Mshw1GcHNCWU5ufLtPPlgIZMoUcgw1vDJ4btUOGHc9C6XEnZgLdo5nbO4Y6imjGzXbu/0nOFu2n6Wdd49dq4706d8wkYjGJIyMI8bxHWFoihQOtiP6uwGmwLEQZlXMA== 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=c5Y28Wm2wIfxhJiYkMWDWW/VzW7YYYLCesct4WDAwPA=; b=LsGK8yrr63gmwpLZDyRoIkcHUqn02Gm7juNsRHXsRzROwy5rCoTHeoB18g6Wy/mZlgTWxNnwgJexXl5Y69RFfBunr0hPXm4WX/cKuub/Rwi+8hDkoQLug8QU/AYtB6sfERQqbH2MYUCuWJm4fl8qhmxmPxPzPewNcBlNnmpklinNobEUqKhSO5FZNDihywi4RJsWoPU0F73Q5FZRgNTk/Ql/gY0iViOUN+Wia8Gx4OZUeKK1kjZLNzHwHBTMvWOIS7FxQPRU5FUQ7/C67eN7AGioXSDrVwIJ8KN2hFOq9vJiInWKgFYkAVBpHVkDo1dZQogpYkLO5b+hJ6ac84ZKwA== 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=c5Y28Wm2wIfxhJiYkMWDWW/VzW7YYYLCesct4WDAwPA=; b=5clJhTyxIKPEDY7JPI9WPfAkdUBeSnRtP9s0VghzvtYBthDDLKp3uPPVgRP/eW4n6gI96T7Ei4h7g5Af+BiVCqHYFbaTAYCkuO/F/g+GJbTkBwrvWYSmeCMqxkLCdghfo2utE5lXai/dGC59HiKQQjF1IbEtTXj9kUR0wUivlCo= 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 CH0PR12MB5090.namprd12.prod.outlook.com (2603:10b6:610:bd::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Thu, 2 Nov 2023 19:00:41 +0000 Received: from DM4PR12MB6280.namprd12.prod.outlook.com ([fe80::5588:7117:d54e:9466]) by DM4PR12MB6280.namprd12.prod.outlook.com ([fe80::5588:7117:d54e:9466%7]) with mapi id 15.20.6954.019; Thu, 2 Nov 2023 19:00:41 +0000 Message-ID: <1eed6bfa-3e98-45d1-9908-2c5a0f3173c3@amd.com> Date: Thu, 2 Nov 2023 15:00:37 -0400 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/edid: add a quirk for two 240Hz Samsung monitors To: Alex Deucher Cc: dri-devel@lists.freedesktop.org, Maxime Ripard , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Jerry Zuo , Aurabindo Pillai , Thomas Zimmermann , Alex Deucher References: <20231101210037.130494-1-hamza.mahfooz@amd.com> Content-Language: en-US From: Hamza Mahfooz In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: YQBPR0101CA0339.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:6b::29) To DM4PR12MB6280.namprd12.prod.outlook.com (2603:10b6:8:a2::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB6280:EE_|CH0PR12MB5090:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c100731-7b0d-4241-f5c5-08dbdbd6023b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l36x+ebe/kKiGBQQNdYL5TUNMo7lHreDqJs51GtlnntZa75dSs9+YhJcTAsVXs1cPF+cIDH5enlvrHE0KfEmmj1WLKnnBXcRFdSZJKlRMYA0L1zjobIydMo1H+zcFWOoopPfpPSL5wMbizjH+DVDiVViN+fn2vTazfMzh8ntvgiAXwxj61SnVrCSQCry2jxc0ixLF/dIkXaECOODO/JRq5OduvAuZtHu3lv6J62ShZWDVV9QeL4sCbBjE+eQZdPipOdG1dzGPDYFGJI3bN1RGIehDA+DcMPP79o6ySevNXFHtK7gYLDHdexUTcvmet/USy8Uf/AvS3CuZA42JDtkp6AIeFk+pNt4tQmQZYrQA0KSg63/npJ41zARqYYh+m6uKzbvM7yN2dydg1vV8LCx6aanbpbqyaYqRQSjikMAvjg+i9Y5Iw9DPEvJnH0kiGwEHpAgCDyIH2f8zIWP4cy7FpHmpvqfrCjbnnNusLoDIylGxZden3cM44k5dxYFCVdKAAkPmqwxgbgOUynZB19kQbx8ljVXrUen66D7fuDyqAVxFfY8D7mTEEttynBCN5CNASp8Y4z+AnIMIqZKK/1kcMdZVrLzPAWTpcog/IOAJyjsppjDAHptMiutupU2KNkj 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:(13230031)(366004)(346002)(136003)(376002)(39860400002)(396003)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(2906002)(45080400002)(6486002)(966005)(478600001)(2616005)(36756003)(26005)(41300700001)(38100700002)(86362001)(31696002)(53546011)(83380400001)(6506007)(6666004)(6512007)(316002)(6916009)(66946007)(54906003)(66476007)(66556008)(44832011)(5660300002)(4326008)(8676002)(8936002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UVl1NytNZFNmV1hSTWRKZUxSSXpUdEZoZGFlWTJUdzAzVXpGSW5MaE5YNDBn?= =?utf-8?B?WDdqMGJmYjJzNlRWeHc2c3dzWGxjdlU0VFBzc2k5K1F2S01sSmZva3FveXRE?= =?utf-8?B?Zy9rQVFKekNjcG10YklWUVBQdUFpS0hXRFZSN3dDVzFQQVRESEtjdG9URG4y?= =?utf-8?B?Skd3bTZTd0lieC82NTdTd1RPeE1pTHVpMWhZMGxSekR5MHkwdFFkQ1NUU2dK?= =?utf-8?B?VjFFNEg5ZWRwcXhiV2wycHh2NEU3eStJQVlCQVMvTDVCR3pyRjVJL3JGK0NH?= =?utf-8?B?YWhQQndUZEZnSkN4blE5b3RWWWNuNCtHY0tlRTJjdHJ6dm05dUFkUWdOcStY?= =?utf-8?B?a0p0RjcrWEpzQ1VWR0RQVmJ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id: 0c100731-7b0d-4241-f5c5-08dbdbd6023b X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB6280.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2023 19:00:41.2081 (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: XWfVa5GYj3TfcSO344IaDn7TJ3FbhqJCp5tRyD0PmVTpK9M+M8c16zfjvsVEkOLqkEXoPt9TGqUtkyTVwxehJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5090 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 12:01:12 -0700 (PDT) On 11/1/23 17:36, Alex Deucher wrote: > On Wed, Nov 1, 2023 at 5:01 PM Hamza Mahfooz wrote: >> >> Without this fix the 5120x1440@240 timing of these monitors >> leads to screen flickering. >> >> Cc: stable@vger.kernel.org # 6.1+ >> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1442 >> Co-developed-by: Harry Wentland >> Signed-off-by: Harry Wentland >> Signed-off-by: Hamza Mahfooz >> --- >> drivers/gpu/drm/drm_edid.c | 47 +++++++++++++++++++++++++++++++++++--- >> 1 file changed, 44 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >> index bca2af4fe1fc..3fdb8907f66b 100644 >> --- a/drivers/gpu/drm/drm_edid.c >> +++ b/drivers/gpu/drm/drm_edid.c >> @@ -89,6 +89,8 @@ static int oui(u8 first, u8 second, u8 third) >> #define EDID_QUIRK_NON_DESKTOP (1 << 12) >> /* Cap the DSC target bitrate to 15bpp */ >> #define EDID_QUIRK_CAP_DSC_15BPP (1 << 13) >> +/* Fix up a particular 5120x1440@240Hz timing */ >> +#define EDID_QUIRK_FIXUP_5120_1440_240 (1 << 14) > > What is wrong with the original timing that needs to be fixed? Apparently, all of timing values for the 5120x1440@240 mode of these monitors aren't set correctly (they are all lower than they should be) in their EDIDs. For what it's worth, the windows driver has had a quirk similar the one proposed in this patch for ~2 years. > > Alex > > >> >> #define MICROSOFT_IEEE_OUI 0xca125c >> >> @@ -170,6 +172,12 @@ static const struct edid_quirk { >> EDID_QUIRK('S', 'A', 'M', 596, EDID_QUIRK_PREFER_LARGE_60), >> EDID_QUIRK('S', 'A', 'M', 638, EDID_QUIRK_PREFER_LARGE_60), >> >> + /* Samsung C49G95T */ >> + EDID_QUIRK('S', 'A', 'M', 0x7053, EDID_QUIRK_FIXUP_5120_1440_240), >> + >> + /* Samsung S49AG95 */ >> + EDID_QUIRK('S', 'A', 'M', 0x71ac, EDID_QUIRK_FIXUP_5120_1440_240), >> + >> /* Sony PVM-2541A does up to 12 bpc, but only reports max 8 bpc */ >> EDID_QUIRK('S', 'N', 'Y', 0x2541, EDID_QUIRK_FORCE_12BPC), >> >> @@ -6586,7 +6594,37 @@ static void update_display_info(struct drm_connector *connector, >> drm_edid_to_eld(connector, drm_edid); >> } >> >> -static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *dev, >> +static void drm_mode_displayid_detailed_edid_quirks(struct drm_connector *connector, >> + struct drm_display_mode *mode) >> +{ >> + unsigned int hsync_width; >> + unsigned int vsync_width; >> + >> + if (connector->display_info.quirks & EDID_QUIRK_FIXUP_5120_1440_240) { >> + if (mode->hdisplay == 5120 && mode->vdisplay == 1440 && >> + mode->clock == 1939490) { >> + hsync_width = mode->hsync_end - mode->hsync_start; >> + vsync_width = mode->vsync_end - mode->vsync_start; >> + >> + mode->clock = 2018490; >> + mode->hdisplay = 5120; >> + mode->hsync_start = 5120 + 8; >> + mode->hsync_end = 5120 + 8 + hsync_width; >> + mode->htotal = 5200; >> + >> + mode->vdisplay = 1440; >> + mode->vsync_start = 1440 + 165; >> + mode->vsync_end = 1440 + 165 + vsync_width; >> + mode->vtotal = 1619; >> + >> + drm_dbg_kms(connector->dev, >> + "[CONNECTOR:%d:%s] Samsung 240Hz mode quirk applied\n", >> + connector->base.id, connector->name); >> + } >> + } >> +} >> + >> +static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_connector *connector, >> struct displayid_detailed_timings_1 *timings, >> bool type_7) >> { >> @@ -6605,7 +6643,7 @@ static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *d >> bool hsync_positive = (timings->hsync[1] >> 7) & 0x1; >> bool vsync_positive = (timings->vsync[1] >> 7) & 0x1; >> >> - mode = drm_mode_create(dev); >> + mode = drm_mode_create(connector->dev); >> if (!mode) >> return NULL; >> >> @@ -6628,6 +6666,9 @@ static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *d >> >> if (timings->flags & 0x80) >> mode->type |= DRM_MODE_TYPE_PREFERRED; >> + >> + drm_mode_displayid_detailed_edid_quirks(connector, mode); >> + >> drm_mode_set_name(mode); >> >> return mode; >> @@ -6650,7 +6691,7 @@ static int add_displayid_detailed_1_modes(struct drm_connector *connector, >> for (i = 0; i < num_timings; i++) { >> struct displayid_detailed_timings_1 *timings = &det->timings[i]; >> >> - newmode = drm_mode_displayid_detailed(connector->dev, timings, type_7); >> + newmode = drm_mode_displayid_detailed(connector, timings, type_7); >> if (!newmode) >> continue; >> >> -- >> 2.42.0 >> -- Hamza