From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com,
Collabora Kernel ML <kernel@collabora.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: [PATCH 5/7] drm/mediatek: mtk_dsi: Use simple encoder
Date: Wed, 8 Apr 2020 23:11:18 +0200 [thread overview]
Message-ID: <20200408211120.1407512-6-enric.balletbo@collabora.com> (raw)
In-Reply-To: <20200408211120.1407512-1-enric.balletbo@collabora.com>
The mtk_dsi 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>
---
drivers/gpu/drm/mediatek/mtk_dsi.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 3400d6686c85..48361c1e9f34 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -22,6 +22,7 @@
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
+#include <drm/drm_simple_kms_helper.h>
#include "mtk_drm_ddp_comp.h"
@@ -788,15 +789,6 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi)
dsi->enabled = false;
}
-static void mtk_dsi_encoder_destroy(struct drm_encoder *encoder)
-{
- drm_encoder_cleanup(encoder);
-}
-
-static const struct drm_encoder_funcs mtk_dsi_encoder_funcs = {
- .destroy = mtk_dsi_encoder_destroy,
-};
-
static int mtk_dsi_create_conn_enc(struct drm_device *drm, struct mtk_dsi *dsi);
static void mtk_dsi_destroy_conn_enc(struct mtk_dsi *dsi);
@@ -1126,8 +1118,8 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi)
{
int ret;
- ret = drm_encoder_init(drm, &dsi->encoder, &mtk_dsi_encoder_funcs,
- DRM_MODE_ENCODER_DSI, NULL);
+ ret = drm_simple_encoder_init(drm, &dsi->encoder,
+ DRM_MODE_ENCODER_DSI);
if (ret) {
DRM_ERROR("Failed to encoder init to drm\n");
return ret;
--
2.25.1
next prev parent reply other threads:[~2020-04-08 21:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 21:11 [PATCH 0/7] Convert mtk-dsi to drm_bridge API and get EDID for ps8640 bridge Enric Balletbo i Serra
2020-04-08 21:11 ` [PATCH 1/7] drm/bridge: ps8640: Get the EDID from eDP control Enric Balletbo i Serra
2020-04-08 21:11 ` [PATCH 2/7] drm/bridge_connector: Set default status connected for eDP connectors Enric Balletbo i Serra
2020-04-08 21:11 ` [PATCH 3/7] drm/mediatek: mtk_dsi: Rename bridge to next_bridge Enric Balletbo i Serra
2020-04-08 21:11 ` [PATCH 4/7] drm/mediatek: mtk_dsi: Convert to bridge driver Enric Balletbo i Serra
2020-04-08 21:11 ` Enric Balletbo i Serra [this message]
2020-04-08 21:11 ` [PATCH 6/7] drm/mediatek: mtk_dsi: Use the drm_panel_bridge API Enric Balletbo i Serra
2020-04-12 19:52 ` Sam Ravnborg
2020-04-08 21:11 ` [PATCH 7/7] drm/mediatek: mtk_dsi: Create connector for bridges 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=20200408211120.1407512-6-enric.balletbo@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=airlied@linux.ie \
--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=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).