From patchwork Tue Nov 3 22:25:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 7547351 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1BB319F36A for ; Tue, 3 Nov 2015 22:25:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B12720797 for ; Tue, 3 Nov 2015 22:25:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17B9120792 for ; Tue, 3 Nov 2015 22:25:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932131AbbKCWZC (ORCPT ); Tue, 3 Nov 2015 17:25:02 -0500 Received: from mail-yk0-f173.google.com ([209.85.160.173]:35215 "EHLO mail-yk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755135AbbKCWZA (ORCPT ); Tue, 3 Nov 2015 17:25:00 -0500 Received: by ykek133 with SMTP id k133so41677028yke.2; Tue, 03 Nov 2015 14:25:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=EWpgQG/dldJv+nzacL/AtWTaLH939ygZjh07uKwXptY=; b=q4Coaji+pNw3wsb5V93QPBuozDR/d3cahOJvgptJtFnXTpRTDoPrl+Kj0L7TUaywLT TSlpSxeB99ApyRyaSrMw/kQKqjmizyR9P5oEsEL8tZB66/SB0cHMFBbwsEP1L7ilV0gZ 5YGpSSTANUqps9mMqWowjrXT+qGFdUmZ9HIuVS8wSGC039nmByqmQ6CrHojT/8iFenzP w089lFYuAd4/HQmLuc2cXnvpNsnvNPdRZ/yXaN10/YWKPud+jjnQZjnJC+seCwDiJdmo IdBGYtmRaPOJsMZyczrpoxj/cqx1wCarm3Ly92a7MzyNemZ768uHWj/3tQoOpeeTkjH3 umTw== MIME-Version: 1.0 X-Received: by 10.129.72.69 with SMTP id v66mr22231728ywa.220.1446589500172; Tue, 03 Nov 2015 14:25:00 -0800 (PST) Received: by 10.37.32.4 with HTTP; Tue, 3 Nov 2015 14:25:00 -0800 (PST) In-Reply-To: <20151103220919.GA4824@amd> References: <20151031201344.GA30459@amd> <563522C5.1000206@amd.com> <20151031212259.GA6253@amd> <20151103220919.GA4824@amd> Date: Tue, 3 Nov 2015 17:25:00 -0500 Message-ID: Subject: Re: Mobility Radeon HD 4530/4570/545v: flicker in 1920x1080 From: Alex Deucher To: Pavel Machek Cc: =?UTF-8?Q?Christian_K=C3=B6nig?= , "Deucher, Alexander" , "linux-fbdev@vger.kernel.org" , kernel list , Maling list - DRI developers Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Nov 3, 2015 at 5:09 PM, Pavel Machek wrote: > Hi! > >> >> >4.3-rc7 kernel, graphics works reasonably well in 1600x1200 mode. But >> >> >my monitor is native 1920x1080, so that mode looks pretty ugly on >> >> >screen. If I go to 1920x1080, I see colored horizontal lines (often >> >> >black) as soon as there's graphics activity. >> >> > >> >> >pavel@half:~$ xrandr >> >> >Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 >> >> >VGA-0 connected 1920x1080+0+0 (normal left inverted right x axis y >> >> >axis) 478mm x 268mm >> >> > 1920x1080 60.00*+ >> >> > 1600x1200 60.00 >> >> > 1680x1050 59.95 >> >> > 1280x1024 75.02 60.02 >> >> > 1440x900 59.89 >> >> > 1024x768 75.08 60.00 >> >> > 800x600 75.00 60.32 >> >> > 640x480 75.00 60.00 >> >> > 720x400 70.08 >> >> > pavel@half:~$ xrandr --output VGA-0 --mode 1600x1200 >> >> > pavel@half:~$ xrandr --output VGA-0 --mode 1920x1080 >> >> > pavel@half:~$ xrandr --output VGA-0 --mode 1600x1200 >> >> > > >> >> >Any ideas? >> >> >> >> Alex probably knows more about this, but it sounds like problems with >> >> switching the memory clocks on 3D load. >> > >> >> Try to disable power management completely with radeon.dpm=0 on the kernel >> >> command line or nailing the hardware at a specific power level using >> >> sysfs. >> > >> > I tried that, but it still flickers. >> >> It's probably pll stability. There seem to be a number of regressions >> since the pll code was rewritten to support matching the hdmi clocks >> more closely. Does this patch help? >> >> diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c >> b/drivers/gpu/drm/radeon/atombios_crtc.c >> index dac78ad..b86f06a 100644 >> --- a/drivers/gpu/drm/radeon/atombios_crtc.c >> +++ b/drivers/gpu/drm/radeon/atombios_crtc.c >> @@ -569,6 +569,8 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, >> radeon_crtc->pll_flags = 0; >> >> if (ASIC_IS_AVIVO(rdev)) { >> + radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP; >> + >> if ((rdev->family == CHIP_RS600) || >> (rdev->family == CHIP_RS690) || >> (rdev->family == CHIP_RS740)) >> > > Help.. maybe... it is tricky to tell. It definitely does _not_ fix the > issue completely. You could also try the old pll algorithm: + radeon_compute_pll_legacy(pll, radeon_crtc->adjusted_clock, &pll_clock, + &fb_div, &frac_fb_div, &ref_div, &post_div); else radeon_compute_pll_legacy(pll, radeon_crtc->adjusted_clock, &pll_clock, &fb_div, &frac_fb_div, &ref_div, &post_div); > >> Unfortunately, it can't be applied as is because we had a similar >> patch which was reverted because it regressed a bunch of other >> systems. The actual pll limits probably need to be tweaked. > > Any ideas how to tweak the pll limits? Adjust the the algorithm in radeon_compute_pll_avivo() in radeon_display.c Alex --- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index dac78ad..8c6e8fa 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -1094,8 +1094,8 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode radeon_compute_pll_legacy(pll, radeon_crtc->adjusted_clock, &pll_clock, &fb_div, &frac_fb_div, &ref_div, &post_div); else if (ASIC_IS_AVIVO(rdev)) - radeon_compute_pll_avivo(pll, radeon_crtc->adjusted_clock, &pll_clock, - &fb_div, &frac_fb_div, &ref_div, &post_div);