Re: [Freedreno] [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format
On 2018-02-23 13:34, abhin...@codeaurora.org wrote: Alright, found it https://cgit.freedesktop.org/~seanpaul/dpu-staging/commit/?h=mtp-testing&id=34906195473f9e04601c49a45e3fedce0132eb7e Thanks Abhinav Reviewed-by: Abhinav Kumar On 2018-02-23 07:06, Sean Paul wrote: On Thu, Feb 22, 2018 at 9:28 PM, Abhinav Kumar wrote: Looks good. Can you point us to the fix done in the dsi-staging driver. All of the downstream changes are in the mtp-testing branch of the dpu-staging tree. The on-list patches are in the for-next-staging, and the patches which have been reviewed on list will go to the for-next branch. Sean Thanks Abhinav -Original Message- From: Rob Clark [mailto:robdcl...@gmail.com] Sent: Thursday, February 22, 2018 11:49 AM To: Sean Paul Cc: freedreno ; linux-arm-msm ; Kristian H. Kristensen ; Jeykumar Sankaran ; Abhinav Kumar Subject: Re: [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format On Thu, Feb 22, 2018 at 12:37 PM, Sean Paul wrote: 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 Reviewed-by: Rob Clark --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [Freedreno] [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format
Alright, found it https://cgit.freedesktop.org/~seanpaul/dpu-staging/commit/?h=mtp-testing&id=34906195473f9e04601c49a45e3fedce0132eb7e Thanks Abhinav On 2018-02-23 07:06, Sean Paul wrote: On Thu, Feb 22, 2018 at 9:28 PM, Abhinav Kumar wrote: Looks good. Can you point us to the fix done in the dsi-staging driver. All of the downstream changes are in the mtp-testing branch of the dpu-staging tree. The on-list patches are in the for-next-staging, and the patches which have been reviewed on list will go to the for-next branch. Sean Thanks Abhinav -Original Message- From: Rob Clark [mailto:robdcl...@gmail.com] Sent: Thursday, February 22, 2018 11:49 AM To: Sean Paul Cc: freedreno ; linux-arm-msm ; Kristian H. Kristensen ; Jeykumar Sankaran ; Abhinav Kumar Subject: Re: [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format On Thu, Feb 22, 2018 at 12:37 PM, Sean Paul wrote: 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 Reviewed-by: Rob Clark --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [Freedreno] [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format
On Thu, Feb 22, 2018 at 9:28 PM, Abhinav Kumar wrote: > Looks good. Can you point us to the fix done in the dsi-staging driver. > All of the downstream changes are in the mtp-testing branch of the dpu-staging tree. The on-list patches are in the for-next-staging, and the patches which have been reviewed on list will go to the for-next branch. Sean > Thanks > > Abhinav > > -Original Message- > From: Rob Clark [mailto:robdcl...@gmail.com] > Sent: Thursday, February 22, 2018 11:49 AM > To: Sean Paul > Cc: freedreno ; linux-arm-msm > ; Kristian H. Kristensen > ; Jeykumar Sankaran ; Abhinav > Kumar > Subject: Re: [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header > format > > On Thu, Feb 22, 2018 at 12:37 PM, Sean Paul wrote: >> 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 > > Reviewed-by: Rob Clark > >> --- >> 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
Re: [Freedreno] [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format
Looks good. Can you point us to the fix done in the dsi-staging driver. Thanks Abhinav -Original Message- From: Rob Clark [mailto:robdcl...@gmail.com] Sent: Thursday, February 22, 2018 11:49 AM To: Sean Paul Cc: freedreno ; linux-arm-msm ; Kristian H. Kristensen ; Jeykumar Sankaran ; Abhinav Kumar Subject: Re: [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format On Thu, Feb 22, 2018 at 12:37 PM, Sean Paul wrote: > 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 Reviewed-by: Rob Clark > --- > 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
Re: [Freedreno] [DPU PATCH] drm/mipi: Remove Qualcomm-specific dsi packet header format
On Thu, Feb 22, 2018 at 12:37 PM, Sean Paul wrote: > 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 Reviewed-by: Rob Clark > --- > 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