linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <mwalle@kernel.org>
To: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: "Nícolas F . R . A . Prado" <nfraprado@collabora.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Nancy . Lin" <nancy.lin@mediatek.com>,
	"Frank Wunderlich" <frank-w@public-files.de>,
	"Jitao Shi" <jitao.shi@mediatek.com>,
	"Stu Hsieh" <stu.hsieh@mediatek.com>,
	dri-devel@lists.freedesktop.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	"Jason-JH.Lin" <jason-jh.lin@mediatek.com>
Subject: Re: [PATCH v4 2/2] drm/mediatek: dpi/dsi: fix possible_crtcs calculation
Date: Thu, 23 Nov 2023 16:37:36 +0100	[thread overview]
Message-ID: <27e0368bb6dd44cd8d176c824cbfe464@kernel.org> (raw)
In-Reply-To: <CAAOTY__LqKkj7Exg=wr0QUD-AQ_i3adXLUSdT2M_oYj7iCBAKQ@mail.gmail.com>

Hi,

>> > mtk_drm_find_possible_crtc_by_comp() assumed that the main path will
>> > always have the CRTC with id 0, the ext id 1 and the third id 2. This
>> > is only true if the paths are all available. But paths are optional
>> > (see
>> > also comment in mtk_drm_kms_init()), e.g. the main path might not be
>> > enabled or available at all. Then the CRTC IDs will shift one up, e.g.
>> > ext will be 0 and the third path will be 1.
>> >
>> > To fix that, dynamically calculate the IDs by the presence of the
>> > paths.
>> >
>> > While at it, make the return code a signed one and return -ENOENT if no
>> > path is found and handle the error in the callers.
>> >
>> > Fixes: 5aa8e7647676 ("drm/mediatek: dpi/dsi: Change the getting
>> > possible_crtc way")
>> > Suggested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>> > Signed-off-by: Michael Walle <mwalle@kernel.org>
>> > Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>> > Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>> 
>> Is there anything wrong with these two patches? They are now lingering
>> around for more than two months.
>> 
>> Unfortunately, patch 2/2 won't apply anymore because of commit
>> 01389b324c97 ("drm/mediatek: Add connector dynamic selection
>> capability). And I'm a bit puzzled for what the crtc_id is used
>> there because I guess it will have the same problem this patch
>> fixes.
> 
> Please base on the latest kernel version to fix.

Of course, but the question is how to fix it. Maybe Jason-JH.Lin
can help here.

In any case, please pick patch 1/2, it's independent of the second
patch and should still apply.

-michael

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-11-23 15:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05  8:49 [PATCH v4 1/2] drm/mediatek: fix kernel oops if no crtc is found Michael Walle
2023-09-05  8:49 ` [PATCH v4 2/2] drm/mediatek: dpi/dsi: fix possible_crtcs calculation Michael Walle
2023-09-05  9:01   ` AngeloGioacchino Del Regno
2023-11-21 14:44   ` Michael Walle
2023-11-23 15:33     ` Chun-Kuang Hu
2023-11-23 15:37       ` Michael Walle [this message]
2023-09-21  9:22 ` [PATCH v4 1/2] drm/mediatek: fix kernel oops if no crtc is found Eugen Hristev
2023-12-07 23:54 ` Chun-Kuang Hu

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=27e0368bb6dd44cd8d176c824cbfe464@kernel.org \
    --to=mwalle@kernel.org \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frank-w@public-files.de \
    --cc=jason-jh.lin@mediatek.com \
    --cc=jitao.shi@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nancy.lin@mediatek.com \
    --cc=nfraprado@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=stu.hsieh@mediatek.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).