From: Kandpal Suraj <suraj.kandpal@intel.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: carsten.haitzler@arm.com, jani.nikula@intel.com,
quic_abhinavk@quicinc.com, laurent.pinchart@ideasonboard.com,
dmitry.baryshkov@linaro.org
Subject: [Intel-gfx] [PATCH 4/6] drm/vc4: vc4 driver changes to accommodate changes done in drm_writeback_connector structure
Date: Wed, 2 Feb 2022 14:24:27 +0530 [thread overview]
Message-ID: <20220202085429.22261-5-suraj.kandpal@intel.com> (raw)
In-Reply-To: <20220202085429.22261-1-suraj.kandpal@intel.com>
Changing vc4 driver to accomadate the change of
drm_writeback_connector.base and drm_writeback_connector.encoder
to a pointer the reason for which is explained in the
Patch(drm: add writeback pointers to drm_connector).
Signed-off-by: Kandpal Suraj <suraj.kandpal@intel.com>
---
drivers/gpu/drm/vc4/vc4_txp.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c
index 9809ca3e2945..9882569d147c 100644
--- a/drivers/gpu/drm/vc4/vc4_txp.c
+++ b/drivers/gpu/drm/vc4/vc4_txp.c
@@ -151,6 +151,10 @@ struct vc4_txp {
struct platform_device *pdev;
+ struct drm_connector drm_conn;
+
+ struct drm_encoder drm_enc;
+
struct drm_writeback_connector connector;
void __iomem *regs;
@@ -159,12 +163,12 @@ struct vc4_txp {
static inline struct vc4_txp *encoder_to_vc4_txp(struct drm_encoder *encoder)
{
- return container_of(encoder, struct vc4_txp, connector.encoder);
+ return container_of(encoder, struct vc4_txp, drm_enc);
}
static inline struct vc4_txp *connector_to_vc4_txp(struct drm_connector *conn)
{
- return container_of(conn, struct vc4_txp, connector.base);
+ return container_of(conn, struct vc4_txp, drm_conn);
}
static const struct debugfs_reg32 txp_regs[] = {
@@ -467,6 +471,7 @@ static int vc4_txp_bind(struct device *dev, struct device *master, void *data)
struct vc4_txp *txp;
struct drm_crtc *crtc;
struct drm_encoder *encoder;
+ struct drm_writeback_connector *wb_conn;
int ret, irq;
irq = platform_get_irq(pdev, 0);
@@ -491,10 +496,13 @@ static int vc4_txp_bind(struct device *dev, struct device *master, void *data)
txp->regset.base = txp->regs;
txp->regset.regs = txp_regs;
txp->regset.nregs = ARRAY_SIZE(txp_regs);
+ wb_conn = &txp->connector;
+ wb_conn->base = &txp->drm_conn;
+ wb_conn->encoder = &txp->drm_enc;
- drm_connector_helper_add(&txp->connector.base,
+ drm_connector_helper_add(wb_conn->base,
&vc4_txp_connector_helper_funcs);
- ret = drm_writeback_connector_init(drm, &txp->connector,
+ ret = drm_writeback_connector_init(drm, wb_conn,
&vc4_txp_connector_funcs,
&vc4_txp_encoder_helper_funcs,
drm_fmts, ARRAY_SIZE(drm_fmts));
@@ -506,7 +514,7 @@ static int vc4_txp_bind(struct device *dev, struct device *master, void *data)
if (ret)
return ret;
- encoder = &txp->connector.encoder;
+ encoder = txp->connector.encoder;
encoder->possible_crtcs = drm_crtc_mask(crtc);
ret = devm_request_irq(dev, irq, vc4_txp_interrupt, 0,
@@ -529,7 +537,7 @@ static void vc4_txp_unbind(struct device *dev, struct device *master,
struct vc4_dev *vc4 = to_vc4_dev(drm);
struct vc4_txp *txp = dev_get_drvdata(dev);
- vc4_txp_connector_destroy(&txp->connector.base);
+ vc4_txp_connector_destroy(txp->connector.base);
vc4->txp = NULL;
}
--
2.17.1
next prev parent reply other threads:[~2022-02-02 8:46 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 8:54 [Intel-gfx] [PATCH 0/6] drm writeback connector changes Kandpal Suraj
2022-02-02 8:54 ` [Intel-gfx] [PATCH 1/6] drm: add writeback pointers to drm_connector Kandpal Suraj
2022-02-02 10:28 ` Dmitry Baryshkov
2022-02-03 8:46 ` Kandpal, Suraj
2022-02-02 11:17 ` kernel test robot
2022-02-02 20:07 ` kernel test robot
2022-02-02 8:54 ` [Intel-gfx] [PATCH 2/6] drm/arm/komeda : change driver to use drm_writeback_connector.base pointer Kandpal Suraj
2022-02-02 8:54 ` [Intel-gfx] [PATCH 3/6] drm/vkms: change vkms " Kandpal Suraj
2022-02-02 8:54 ` Kandpal Suraj [this message]
2022-02-02 8:54 ` [Intel-gfx] [PATCH 5/6] drm/rcar_du: changes to rcar-du driver resulting from drm_writeback_connector structure changes Kandpal Suraj
2022-02-02 12:42 ` Laurent Pinchart
2022-02-02 13:15 ` Jani Nikula
2022-02-02 13:26 ` Laurent Pinchart
2022-02-02 15:38 ` Jani Nikula
2022-02-26 18:27 ` Rob Clark
2022-02-28 8:03 ` Laurent Pinchart
2022-02-28 12:09 ` Jani Nikula
2022-02-28 12:28 ` Laurent Pinchart
2022-02-28 13:42 ` Laurent Pinchart
2022-03-02 18:28 ` Abhinav Kumar
2022-03-02 18:31 ` Laurent Pinchart
2022-03-03 17:32 ` Abhinav Kumar
2022-03-04 9:56 ` Kandpal, Suraj
2022-03-04 10:39 ` Dmitry Baryshkov
2022-03-04 10:47 ` Kandpal, Suraj
2022-03-04 11:25 ` Dmitry Baryshkov
2022-03-04 14:16 ` Kandpal, Suraj
2022-03-04 20:47 ` Abhinav Kumar
2022-03-08 14:30 ` Kandpal, Suraj
2022-03-08 19:44 ` Abhinav Kumar
2022-02-06 23:32 ` Dmitry Baryshkov
2022-02-07 7:20 ` Abhinav Kumar
2022-02-10 1:40 ` Abhinav Kumar
2022-02-10 4:58 ` Laurent Pinchart
2022-02-22 3:32 ` Dmitry Baryshkov
2022-02-22 7:34 ` Laurent Pinchart
2022-02-24 0:27 ` Abhinav Kumar
2022-02-02 13:34 ` Ville Syrjälä
2022-02-02 13:40 ` Dmitry Baryshkov
2022-02-02 15:57 ` Jani Nikula
2022-02-23 6:17 ` Kandpal, Suraj
2022-02-25 23:26 ` Abhinav Kumar
2022-02-26 5:10 ` Kandpal, Suraj
2022-02-28 8:00 ` Laurent Pinchart
2022-02-28 8:07 ` Dmitry Baryshkov
2022-02-28 8:28 ` Laurent Pinchart
2022-02-02 8:54 ` [Intel-gfx] [PATCH 6/6] drm/arm: changes to malidp " Kandpal Suraj
2022-02-02 10:01 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm writeback connector changes Patchwork
2022-02-02 10:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-02 12:22 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=20220202085429.22261-5-suraj.kandpal@intel.com \
--to=suraj.kandpal@intel.com \
--cc=carsten.haitzler@arm.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=quic_abhinavk@quicinc.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