From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: linux-kernel@vger.kernel.org,
Collabora Kernel ML <kernel@collabora.com>,
narmstrong@baylibre.com, a.hajda@samsung.com,
laurent.pinchart@ideasonboard.com, matthias.bgg@gmail.com,
drinkcat@chromium.org, hsinyi@chromium.org,
Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Philipp Zabel <p.zabel@pengutronix.de>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [RESEND PATCH 3/3] drm/mediatek: mtk_dpi: Use simple encoder
Date: Thu, 9 Jul 2020 12:47:11 +0200 [thread overview]
Message-ID: <dba9e359-6f58-e283-d39a-82bfbec15d5a@collabora.com> (raw)
In-Reply-To: <3f7338ad-b83d-da1d-2b07-f5225c56d7f9@collabora.com>
Hi again,
On 8/7/20 17:12, Enric Balletbo i Serra wrote:
> Hi Boris,
>
> Thank you to spend some time to review the patches.
>
> On 1/7/20 13:41, Boris Brezillon wrote:
>> On Mon, 18 May 2020 19:39:09 +0200
>> Enric Balletbo i Serra <enric.balletbo@collabora.com> wrote:
>>
>>> The mtk_dpi driver uses an empty implementation for its encoder. Replace
>>> the code with the generic simple encoder.
>>>
>>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>>> Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
>>> ---
>>>
>>> drivers/gpu/drm/mediatek/mtk_dpi.c | 14 +++-----------
>>> 1 file changed, 3 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
>>> index baad198c69eb..80778b2aac2a 100644
>>> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
>>> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
>>> @@ -20,6 +20,7 @@
>>> #include <drm/drm_bridge.h>
>>> #include <drm/drm_crtc.h>
>>> #include <drm/drm_of.h>
>>> +#include <drm/drm_simple_kms_helper.h>
>>>
>>> #include "mtk_dpi_regs.h"
>>> #include "mtk_drm_ddp_comp.h"
>>> @@ -510,15 +511,6 @@ static int mtk_dpi_set_display_mode(struct mtk_dpi *dpi,
>>> return 0;
>>> }
>>>
>>> -static void mtk_dpi_encoder_destroy(struct drm_encoder *encoder)
>>> -{
>>> - drm_encoder_cleanup(encoder);
>>> -}
>>> -
>>> -static const struct drm_encoder_funcs mtk_dpi_encoder_funcs = {
>>> - .destroy = mtk_dpi_encoder_destroy,
>>> -};
>>> -
>>> static int mtk_dpi_bridge_attach(struct drm_bridge *bridge,
>>> enum drm_bridge_attach_flags flags)
>>> {
>>> @@ -591,8 +583,8 @@ static int mtk_dpi_bind(struct device *dev, struct device *master, void *data)
>>> return ret;
>>> }
>>>
>>> - ret = drm_encoder_init(drm_dev, &dpi->encoder, &mtk_dpi_encoder_funcs,
>>> - DRM_MODE_ENCODER_TMDS, NULL);
>>> + ret = drm_simple_encoder_init(drm_dev, &dpi->encoder,
>>> + DRM_MODE_ENCODER_TMDS);
>>
>> Not related to this change, but shouldn't we have DRM_MODE_ENCODER_DPI
>> here?
>>
>
Thinking a bit more about this and this patchset in general, I think I'll drop
this patch from the series, at the end, all the encoder creation stuff should be
moved to mtk_drm_drv.
> Right, I'll add a patch to fix this.
>
>>> if (ret) {
>>> dev_err(dev, "Failed to initialize decoder: %d\n", ret);
>>> goto err_unregister;
>>
>
next prev parent reply other threads:[~2020-07-09 10:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 17:39 [RESEND PATCH 0/3] Convert mtk-dpi to drm_bridge API Enric Balletbo i Serra
2020-05-18 17:39 ` [RESEND PATCH 1/3] drm/mediatek: mtk_dpi: Rename bridge to next_bridge Enric Balletbo i Serra
2020-07-01 11:23 ` Boris Brezillon
2020-07-01 11:36 ` Boris Brezillon
2020-05-18 17:39 ` [RESEND PATCH 2/3] drm/mediatek: mtk_dpi: Convert to bridge driver Enric Balletbo i Serra
2020-07-01 11:51 ` Boris Brezillon
2020-07-08 15:15 ` Enric Balletbo i Serra
2020-05-18 17:39 ` [RESEND PATCH 3/3] drm/mediatek: mtk_dpi: Use simple encoder Enric Balletbo i Serra
2020-07-01 11:41 ` Boris Brezillon
2020-07-08 15:12 ` Enric Balletbo i Serra
2020-07-09 10:47 ` Enric Balletbo i Serra [this message]
2020-06-12 15:30 ` [RESEND PATCH 0/3] Convert mtk-dpi to drm_bridge API Enric Balletbo i Serra
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=dba9e359-6f58-e283-d39a-82bfbec15d5a@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=boris.brezillon@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=drinkcat@chromium.org \
--cc=hsinyi@chromium.org \
--cc=kernel@collabora.com \
--cc=laurent.pinchart@ideasonboard.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=narmstrong@baylibre.com \
--cc=p.zabel@pengutronix.de \
/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).