From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Christian_K=c3=b6nig?= Date: Wed, 04 Nov 2015 07:36:32 +0000 Subject: Re: Mobility Radeon HD 4530/4570/545v: flicker in 1920x1080 Message-Id: <5639B580.1050409@vodafone.de> List-Id: References: <20151031201344.GA30459@amd> <563522C5.1000206@amd.com> <20151031212259.GA6253@amd> <20151103220919.GA4824@amd> <20151103230329.GA4167@amd> In-Reply-To: <20151103230329.GA4167@amd> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Pavel Machek , Alex Deucher Cc: "Deucher, Alexander" , "linux-fbdev@vger.kernel.org" , =?UTF-8?Q?Christian_K=c3=b6nig?= , Maling list - DRI developers , kernel list On 04.11.2015 00:03, Pavel Machek wrote: > Hi! > > >>>>>>> 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: > I reverted the patch above, and switched to the old algorithm. > > The flicker is still there. (But maybe its less horrible, like with > RADEON_PLL_PREFER_MINM_OVER_MAXP). The flickering would vanish completely if that's the reason for the issue you are seeing. Try setting ref_div_min and ref_div_max to 2 in radeon_compute_pll_avivo(). But I'm not 100% convinced that this is actually a PLL problem, try to compile the firmware it complains about into the kernel as well. Regards, Christian. > > Thanks, > Pavel > From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Christian_K=c3=b6nig?= Subject: Re: Mobility Radeon HD 4530/4570/545v: flicker in 1920x1080 Date: Wed, 4 Nov 2015 08:36:32 +0100 Message-ID: <5639B580.1050409@vodafone.de> References: <20151031201344.GA30459@amd> <563522C5.1000206@amd.com> <20151031212259.GA6253@amd> <20151103220919.GA4824@amd> <20151103230329.GA4167@amd> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; Format="flowed" Content-Transfer-Encoding: base64 Return-path: Received: from pegasos-out.vodafone.de (pegasos-out.vodafone.de [80.84.1.38]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C3E4890EA for ; Tue, 3 Nov 2015 23:36:40 -0800 (PST) In-Reply-To: <20151103230329.GA4167@amd> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Pavel Machek , Alex Deucher Cc: "Deucher, Alexander" , "linux-fbdev@vger.kernel.org" , =?UTF-8?Q?Christian_K=c3=b6nig?= , Maling list - DRI developers , kernel list List-Id: dri-devel@lists.freedesktop.org T24gMDQuMTEuMjAxNSAwMDowMywgUGF2ZWwgTWFjaGVrIHdyb3RlOgo+IEhpIQo+Cj4KPj4+Pj4+ PiBBbnkgaWRlYXM/Cj4+Pj4+PiBBbGV4IHByb2JhYmx5IGtub3dzIG1vcmUgYWJvdXQgdGhpcywg YnV0IGl0IHNvdW5kcyBsaWtlIHByb2JsZW1zIHdpdGgKPj4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pdl9tYXggdG8gMiBpbiByYWRlb25fY29tcHV0ZV9wbGxfYXZpdm8oKS4KCkJ1dCBJ J20gbm90IDEwMCUgY29udmluY2VkIHRoYXQgdGhpcyBpcyBhY3R1YWxseSBhIFBMTCBwcm9ibGVt LCB0cnkgdG8gCmNvbXBpbGUgdGhlIGZpcm13YXJlIGl0IGNvbXBsYWlucyBhYm91dCBpbnRvIHRo ZSBrZXJuZWwgYXMgd2VsbC4KClJlZ2FyZHMsCkNocmlzdGlhbi4KCj4KPiBUaGFua3MsCj4gCQkJ CQkJCQlQYXZlbAo+IAkJCQkJCQkJCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fXwpkcmktZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1kZXZlbEBsaXN0cy5mcmVl ZGVza3RvcC5vcmcKaHR0cDovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZv L2RyaS1kZXZlbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932260AbbKDHq3 (ORCPT ); Wed, 4 Nov 2015 02:46:29 -0500 Received: from pegasos-out.vodafone.de ([80.84.1.38]:44492 "EHLO pegasos-out.vodafone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753732AbbKDHq0 (ORCPT ); Wed, 4 Nov 2015 02:46:26 -0500 X-Spam-Flag: NO X-Spam-Score: -0.054 Authentication-Results: rohrpostix2.prod.vfnet.de (amavisd-new); dkim=pass header.i=@vodafone.de X-DKIM: OpenDKIM Filter v2.6.8 pegasos-out.vodafone.de A071C4C2FF5 Subject: Re: Mobility Radeon HD 4530/4570/545v: flicker in 1920x1080 To: Pavel Machek , Alex Deucher References: <20151031201344.GA30459@amd> <563522C5.1000206@amd.com> <20151031212259.GA6253@amd> <20151103220919.GA4824@amd> <20151103230329.GA4167@amd> Cc: "Deucher, Alexander" , "linux-fbdev@vger.kernel.org" , =?UTF-8?Q?Christian_K=c3=b6nig?= , Maling list - DRI developers , kernel list From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <5639B580.1050409@vodafone.de> Date: Wed, 4 Nov 2015 08:36:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151103230329.GA4167@amd> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04.11.2015 00:03, Pavel Machek wrote: > Hi! > > >>>>>>> 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: > I reverted the patch above, and switched to the old algorithm. > > The flicker is still there. (But maybe its less horrible, like with > RADEON_PLL_PREFER_MINM_OVER_MAXP). The flickering would vanish completely if that's the reason for the issue you are seeing. Try setting ref_div_min and ref_div_max to 2 in radeon_compute_pll_avivo(). But I'm not 100% convinced that this is actually a PLL problem, try to compile the firmware it complains about into the kernel as well. Regards, Christian. > > Thanks, > Pavel >