From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9763C433DB for ; Sun, 7 Feb 2021 10:47:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACC8E64D9D for ; Sun, 7 Feb 2021 10:47:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbhBGKq4 (ORCPT ); Sun, 7 Feb 2021 05:46:56 -0500 Received: from smtprelay0199.hostedemail.com ([216.40.44.199]:40782 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229506AbhBGKq3 (ORCPT ); Sun, 7 Feb 2021 05:46:29 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id BE53518223253; Sun, 7 Feb 2021 10:45:46 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: nest17_010c860275f5 X-Filterd-Recvd-Size: 2900 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA; Sun, 7 Feb 2021 10:45:46 +0000 (UTC) Message-ID: Subject: Re: [PATCH] I was wondering why I can't set the resolution to 2560x1080, while in windows 7 I can without a problem. I looked at the radeon driver code and found it doesn't support this resolution. So I made some changes. I added the hdmi_mhz parameter. In cmdline I set radeon.hdmi_mhz=190 Only tested on the Radeon HD 5830 From: Joe Perches To: Marcin Raszka , linux-kernel@vger.kernel.org Date: Sun, 07 Feb 2021 02:45:44 -0800 In-Reply-To: <20210207094604.7250-1-djraszit@gmail.com> References: <20210207094604.7250-1-djraszit@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Your subject needs to be changed and a commit log added. > diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c [] > @@ -37,6 +37,8 @@ >  #include >  #include > > +extern int hdmimhz; > + >  static int radeon_dp_handle_hpd(struct drm_connector *connector) >  { >   struct radeon_connector *radeon_connector = to_radeon_connector(connector); > @@ -503,7 +505,7 @@ static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_conn >   struct mode_size { >   int w; >   int h; > - } common_modes[17] = { > + } common_modes[18] = { probably better without a specific array size >   { 640, 480}, >   { 720, 480}, >   { 800, 600}, > @@ -520,10 +522,11 @@ static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_conn >   {1680, 1050}, >   {1600, 1200}, >   {1920, 1080}, > - {1920, 1200} > + {1920, 1200}, > + {2560, 1080} >   }; >   > > - for (i = 0; i < 17; i++) { > + for (i = 0; i < 18; i++) { for (i = 0; i < ARRAY_SIZE(common_modes); i++) { > @@ -1491,25 +1494,32 @@ static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connecto >   (mode->clock > 135000)) >   return MODE_CLOCK_HIGH; >   > > - if (radeon_connector->use_digital && (mode->clock > 165000)) { > + if (radeon_connector->use_digital && (mode->clock > (hdmimhz * 1000))) { >   if ((radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I) || >   (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D) || > - (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B)) > + (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B)){ > + printk("MODE_CLOCK_HIHG0 %d", hdmimhz); unnecessary debugging printks?