dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Inki Dae <inki.dae@samsung.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Marian Mihailescu <mihailescu2m@gmail.com>
Cc: linux-samsung-soc@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v2] drm/exynos/mixer: fix MIXER shadow registry synchronisation code
Date: Thu, 21 Mar 2019 09:32:22 +0100	[thread overview]
Message-ID: <fef40cf7-19f2-a182-1dcc-cda119f49057@samsung.com> (raw)
In-Reply-To: <0fc8310d-0a08-8873-01b1-e000c8b495d5@samsung.com>

Hi Inki,

On 2019-03-21 09:20, Inki Dae wrote:
> 19. 3. 19. 오후 10:05에 Andrzej Hajda 이(가) 쓴 글:
>> MIXER on Exynos5 SoCs uses different synchronisation method than Exynos4
>> to update internal state (shadow registers).
>> Apparently the driver implements it incorrectly. The rule should be
>> as follows:
>> - do not request updating registers until previous request was finished,
>>    ie. MXR_CFG_LAYER_UPDATE_COUNT must be 0.
>> - before setting registers synchronisation on VSYNC should be turned off,
>>    ie. MXR_STATUS_SYNC_ENABLE should be reset,
>> - after finishing MXR_STATUS_SYNC_ENABLE should be set again.
>> The patch hopefully implements it correctly.
>> Below sample kernel log from page fault caused by the bug:
>>
>> [   25.670038] exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0x2247b800
>> [   25.677888] ------------[ cut here ]------------
>> [   25.682164] kernel BUG at ../drivers/iommu/exynos-iommu.c:450!
>> [   25.687971] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
>> [   25.693778] Modules linked in:
>> [   25.696816] CPU: 5 PID: 1553 Comm: fb-release_test Not tainted 5.0.0-rc7-01157-g5f86b1566bdd #136
>> [   25.705646] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
>> [   25.711710] PC is at exynos_sysmmu_irq+0x1c0/0x264
>> [   25.716470] LR is at lock_is_held_type+0x44/0x64
>>
>> v2: added missing MXR_CFG_LAYER_UPDATE bit setting in mixer_enable_sync
>>
>> Reported-by: Marian Mihailescu <mihailescu2m@gmail.com>
>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>> ---
>> Hi Inki and Marian,
>>
>> This is fixed version of my previous patch. The only difference is
>> added missing MXR_CFG_LAYER_UPDATE setting in mixer_enable_sync.
>> I hope this time it is correct. It should solve one page fault issue
>> in MIXER, Marek is preparing fix for another issue (to low clock set by
>> devfreq). I hope with both patches page faults will not happen anymore ;)
> With this patch modetest worked well.
> BTW, this change may affect Exynos4 series - which have different synchronization way to update shadow registers - so could you or someone else who has Exynos4xxx based board check it on Odroid-u3 board? I have no board. :(

Andrzej's patch has been tested on Exynos4412 too. HDMI display works 
fine on Odroid U3.

...

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-03-21  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190319130518eucas1p138ba1c2026a1d83959c2bdeaf6575ab5@eucas1p1.samsung.com>
2019-03-19 13:05 ` [PATCH v2] drm/exynos/mixer: fix MIXER shadow registry synchronisation code Andrzej Hajda
2019-03-21  8:20   ` Inki Dae
2019-03-21  8:32     ` Marek Szyprowski [this message]
2019-03-21  9:41       ` Inki Dae
2019-03-21  9:56   ` Marian Mihailescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fef40cf7-19f2-a182-1dcc-cda119f49057@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mihailescu2m@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).