From: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
abhinavk-jfJNa2p1gH1BDgjK7y7TUQ@public.gmane.org,
robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Subject: [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format
Date: Thu, 22 Feb 2018 12:37:58 -0500 [thread overview]
Message-ID: <20180222173758.6125-1-seanpaul@chromium.org> (raw)
msm/dsi already formats the packet header correctly, so this breaks
every driver except for the downstream dsi-staging driver (which I've
submitted a patch for).
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
drivers/gpu/drm/drm_mipi_dsi.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 688c8a82ba37..4b47226b90d4 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -454,7 +454,7 @@ int mipi_dsi_create_packet(struct mipi_dsi_packet *packet,
return -EINVAL;
memset(packet, 0, sizeof(*packet));
- packet->header[2] = ((msg->channel & 0x3) << 6) | (msg->type & 0x3f);
+ packet->header[0] = ((msg->channel & 0x3) << 6) | (msg->type & 0x3f);
/* TODO: compute ECC if hardware support is not available */
@@ -466,16 +466,16 @@ int mipi_dsi_create_packet(struct mipi_dsi_packet *packet,
* and 2.
*/
if (mipi_dsi_packet_format_is_long(msg->type)) {
- packet->header[0] = (msg->tx_len >> 0) & 0xff;
- packet->header[1] = (msg->tx_len >> 8) & 0xff;
+ packet->header[1] = (msg->tx_len >> 0) & 0xff;
+ packet->header[2] = (msg->tx_len >> 8) & 0xff;
packet->payload_length = msg->tx_len;
packet->payload = msg->tx_buf;
} else {
const u8 *tx = msg->tx_buf;
- packet->header[0] = (msg->tx_len > 0) ? tx[0] : 0;
- packet->header[1] = (msg->tx_len > 1) ? tx[1] : 0;
+ packet->header[1] = (msg->tx_len > 0) ? tx[0] : 0;
+ packet->header[2] = (msg->tx_len > 1) ? tx[1] : 0;
}
packet->size = sizeof(packet->header) + packet->payload_length;
--
2.16.1.291.g4437f3f132-goog
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
next reply other threads:[~2018-02-22 17:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 17:37 Sean Paul [this message]
[not found] ` <20180222173758.6125-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-02-22 19:48 ` [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format Rob Clark
[not found] ` <CAF6AEGuQPgq4SwwTqdnt=KLNcRRevkUB9PRpD0nsQKFoOox3FA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-23 2:28 ` Abhinav Kumar
[not found] ` <3907cdfb10d5445f889e464720226c74-U89/IHrbReUlMFxvxe/2TaRtKmQZhJ7pQQ4Iyu8u01E@public.gmane.org>
2018-02-23 15:06 ` Sean Paul
[not found] ` <CAOw6vb+2z0LBcZSiTf+k=J=26h8uWqyBhoQrEd1=4+-oA7fnWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-23 21:34 ` abhinavk-sgV2jX0FEOL9JmXXK+q4OQ
[not found] ` <5e7d083e7e5d49717f20c928057856eb-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-03-02 20:48 ` abhinavk-sgV2jX0FEOL9JmXXK+q4OQ
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=20180222173758.6125-1-seanpaul@chromium.org \
--to=seanpaul-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
--cc=abhinavk-jfJNa2p1gH1BDgjK7y7TUQ@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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).