* [PATCH 0/5] drm/dsi: cleanups and compression helpers
@ 2019-10-22 10:09 Jani Nikula
2019-10-22 10:09 ` [PATCH 1/5] drm/dsi: clean up DSI data type definitions Jani Nikula
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Jani Nikula @ 2019-10-22 10:09 UTC (permalink / raw)
To: dri-devel; +Cc: jani.nikula, intel-gfx
Some cleanup and prep work for compression. Users for these are in the
works, but hopefully we can proceed with this already. Should be pretty
straightforward.
BR,
Jani.
Jani Nikula (5):
drm/dsi: clean up DSI data type definitions
drm/dsi: add missing DSI data types
drm/dsi: add missing DSI DCS commands
drm/dsi: rename MIPI_DCS_SET_PARTIAL_AREA to MIPI_DCS_SET_PARTIAL_ROWS
drm/dsi: add helpers for DSI compression mode and PPS packets
drivers/gpu/drm/drm_mipi_dsi.c | 55 ++++++++++++++++++++++++++++++++--
drivers/gpu/drm/tiny/st7586.c | 2 +-
include/drm/drm_mipi_dsi.h | 4 +++
include/video/mipi_display.h | 24 +++++++++++----
4 files changed, 76 insertions(+), 9 deletions(-)
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/5] drm/dsi: clean up DSI data type definitions
2019-10-22 10:09 [PATCH 0/5] drm/dsi: cleanups and compression helpers Jani Nikula
@ 2019-10-22 10:09 ` Jani Nikula
2019-10-24 7:56 ` Kulkarni, Vandita
2019-10-22 10:09 ` [PATCH 2/5] drm/dsi: add missing DSI data types Jani Nikula
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2019-10-22 10:09 UTC (permalink / raw)
To: dri-devel; +Cc: jani.nikula, intel-gfx
Rename picture parameter set (it's a long packet, not a long write) and
compression mode (it's not a DCS command) enumerations according to the
DSI specification. Order the types according to the spec. Use tabs
instead of spaces for indentation. Use all lower case for hex.
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_mipi_dsi.c | 4 ++--
include/video/mipi_display.h | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index bd2498bbd74a..f237d80828c3 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -373,6 +373,7 @@ bool mipi_dsi_packet_format_is_short(u8 type)
case MIPI_DSI_V_SYNC_END:
case MIPI_DSI_H_SYNC_START:
case MIPI_DSI_H_SYNC_END:
+ case MIPI_DSI_COMPRESSION_MODE:
case MIPI_DSI_END_OF_TRANSMISSION:
case MIPI_DSI_COLOR_MODE_OFF:
case MIPI_DSI_COLOR_MODE_ON:
@@ -387,7 +388,6 @@ bool mipi_dsi_packet_format_is_short(u8 type)
case MIPI_DSI_DCS_SHORT_WRITE:
case MIPI_DSI_DCS_SHORT_WRITE_PARAM:
case MIPI_DSI_DCS_READ:
- case MIPI_DSI_DCS_COMPRESSION_MODE:
case MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE:
return true;
}
@@ -406,11 +406,11 @@ EXPORT_SYMBOL(mipi_dsi_packet_format_is_short);
bool mipi_dsi_packet_format_is_long(u8 type)
{
switch (type) {
- case MIPI_DSI_PPS_LONG_WRITE:
case MIPI_DSI_NULL_PACKET:
case MIPI_DSI_BLANKING_PACKET:
case MIPI_DSI_GENERIC_LONG_WRITE:
case MIPI_DSI_DCS_LONG_WRITE:
+ case MIPI_DSI_PICTURE_PARAMETER_SET:
case MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20:
case MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24:
case MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16:
diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h
index cba57a678daf..79fd71cf4934 100644
--- a/include/video/mipi_display.h
+++ b/include/video/mipi_display.h
@@ -17,6 +17,9 @@ enum {
MIPI_DSI_H_SYNC_START = 0x21,
MIPI_DSI_H_SYNC_END = 0x31,
+ MIPI_DSI_COMPRESSION_MODE = 0x07,
+ MIPI_DSI_END_OF_TRANSMISSION = 0x08,
+
MIPI_DSI_COLOR_MODE_OFF = 0x02,
MIPI_DSI_COLOR_MODE_ON = 0x12,
MIPI_DSI_SHUTDOWN_PERIPHERAL = 0x22,
@@ -35,18 +38,15 @@ enum {
MIPI_DSI_DCS_READ = 0x06,
- MIPI_DSI_DCS_COMPRESSION_MODE = 0x07,
- MIPI_DSI_PPS_LONG_WRITE = 0x0A,
-
MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE = 0x37,
- MIPI_DSI_END_OF_TRANSMISSION = 0x08,
-
MIPI_DSI_NULL_PACKET = 0x09,
MIPI_DSI_BLANKING_PACKET = 0x19,
MIPI_DSI_GENERIC_LONG_WRITE = 0x29,
MIPI_DSI_DCS_LONG_WRITE = 0x39,
+ MIPI_DSI_PICTURE_PARAMETER_SET = 0x0a,
+
MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20 = 0x0c,
MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24 = 0x1c,
MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16 = 0x2c,
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/5] drm/dsi: add missing DSI data types
2019-10-22 10:09 [PATCH 0/5] drm/dsi: cleanups and compression helpers Jani Nikula
2019-10-22 10:09 ` [PATCH 1/5] drm/dsi: clean up DSI data type definitions Jani Nikula
@ 2019-10-22 10:09 ` Jani Nikula
2019-10-22 10:09 ` [PATCH 3/5] drm/dsi: add missing DSI DCS commands Jani Nikula
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2019-10-22 10:09 UTC (permalink / raw)
To: dri-devel; +Cc: jani.nikula, intel-gfx
Add execute queue and compressed pixel stream packet data types for
completeness.
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_mipi_dsi.c | 2 ++
include/video/mipi_display.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index f237d80828c3..3f33f02571fd 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -388,6 +388,7 @@ bool mipi_dsi_packet_format_is_short(u8 type)
case MIPI_DSI_DCS_SHORT_WRITE:
case MIPI_DSI_DCS_SHORT_WRITE_PARAM:
case MIPI_DSI_DCS_READ:
+ case MIPI_DSI_EXECUTE_QUEUE:
case MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE:
return true;
}
@@ -411,6 +412,7 @@ bool mipi_dsi_packet_format_is_long(u8 type)
case MIPI_DSI_GENERIC_LONG_WRITE:
case MIPI_DSI_DCS_LONG_WRITE:
case MIPI_DSI_PICTURE_PARAMETER_SET:
+ case MIPI_DSI_COMPRESSED_PIXEL_STREAM:
case MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20:
case MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24:
case MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16:
diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h
index 79fd71cf4934..6b6390dfa203 100644
--- a/include/video/mipi_display.h
+++ b/include/video/mipi_display.h
@@ -37,6 +37,7 @@ enum {
MIPI_DSI_DCS_SHORT_WRITE_PARAM = 0x15,
MIPI_DSI_DCS_READ = 0x06,
+ MIPI_DSI_EXECUTE_QUEUE = 0x16,
MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE = 0x37,
@@ -46,6 +47,7 @@ enum {
MIPI_DSI_DCS_LONG_WRITE = 0x39,
MIPI_DSI_PICTURE_PARAMETER_SET = 0x0a,
+ MIPI_DSI_COMPRESSED_PIXEL_STREAM = 0x0b,
MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20 = 0x0c,
MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24 = 0x1c,
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/5] drm/dsi: add missing DSI DCS commands
2019-10-22 10:09 [PATCH 0/5] drm/dsi: cleanups and compression helpers Jani Nikula
2019-10-22 10:09 ` [PATCH 1/5] drm/dsi: clean up DSI data type definitions Jani Nikula
2019-10-22 10:09 ` [PATCH 2/5] drm/dsi: add missing DSI data types Jani Nikula
@ 2019-10-22 10:09 ` Jani Nikula
2019-10-22 10:09 ` [PATCH 4/5] drm/dsi: rename MIPI_DCS_SET_PARTIAL_AREA to MIPI_DCS_SET_PARTIAL_ROWS Jani Nikula
2019-10-22 10:09 ` [PATCH 5/5] drm/dsi: add helpers for DSI compression mode and PPS packets Jani Nikula
4 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2019-10-22 10:09 UTC (permalink / raw)
To: dri-devel; +Cc: jani.nikula, Vandita Kulkarni, intel-gfx
Update from the DCS specification.
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/video/mipi_display.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h
index 6b6390dfa203..928f8c4b6658 100644
--- a/include/video/mipi_display.h
+++ b/include/video/mipi_display.h
@@ -79,7 +79,9 @@ enum {
enum {
MIPI_DCS_NOP = 0x00,
MIPI_DCS_SOFT_RESET = 0x01,
+ MIPI_DCS_GET_COMPRESSION_MODE = 0x03,
MIPI_DCS_GET_DISPLAY_ID = 0x04,
+ MIPI_DCS_GET_ERROR_COUNT_ON_DSI = 0x05,
MIPI_DCS_GET_RED_CHANNEL = 0x06,
MIPI_DCS_GET_GREEN_CHANNEL = 0x07,
MIPI_DCS_GET_BLUE_CHANNEL = 0x08,
@@ -94,6 +96,8 @@ enum {
MIPI_DCS_EXIT_SLEEP_MODE = 0x11,
MIPI_DCS_ENTER_PARTIAL_MODE = 0x12,
MIPI_DCS_ENTER_NORMAL_MODE = 0x13,
+ MIPI_DCS_GET_IMAGE_CHECKSUM_RGB = 0x14,
+ MIPI_DCS_GET_IMAGE_CHECKSUM_CT = 0x15,
MIPI_DCS_EXIT_INVERT_MODE = 0x20,
MIPI_DCS_ENTER_INVERT_MODE = 0x21,
MIPI_DCS_SET_GAMMA_CURVE = 0x26,
@@ -105,6 +109,7 @@ enum {
MIPI_DCS_WRITE_LUT = 0x2D,
MIPI_DCS_READ_MEMORY_START = 0x2E,
MIPI_DCS_SET_PARTIAL_AREA = 0x30,
+ MIPI_DCS_SET_PARTIAL_COLUMNS = 0x31,
MIPI_DCS_SET_SCROLL_AREA = 0x33,
MIPI_DCS_SET_TEAR_OFF = 0x34,
MIPI_DCS_SET_TEAR_ON = 0x35,
@@ -114,7 +119,10 @@ enum {
MIPI_DCS_ENTER_IDLE_MODE = 0x39,
MIPI_DCS_SET_PIXEL_FORMAT = 0x3A,
MIPI_DCS_WRITE_MEMORY_CONTINUE = 0x3C,
+ MIPI_DCS_SET_3D_CONTROL = 0x3D,
MIPI_DCS_READ_MEMORY_CONTINUE = 0x3E,
+ MIPI_DCS_GET_3D_CONTROL = 0x3F,
+ MIPI_DCS_SET_VSYNC_TIMING = 0x40,
MIPI_DCS_SET_TEAR_SCANLINE = 0x44,
MIPI_DCS_GET_SCANLINE = 0x45,
MIPI_DCS_SET_DISPLAY_BRIGHTNESS = 0x51, /* MIPI DCS 1.3 */
@@ -126,7 +134,9 @@ enum {
MIPI_DCS_SET_CABC_MIN_BRIGHTNESS = 0x5E, /* MIPI DCS 1.3 */
MIPI_DCS_GET_CABC_MIN_BRIGHTNESS = 0x5F, /* MIPI DCS 1.3 */
MIPI_DCS_READ_DDB_START = 0xA1,
+ MIPI_DCS_READ_PPS_START = 0xA2,
MIPI_DCS_READ_DDB_CONTINUE = 0xA8,
+ MIPI_DCS_READ_PPS_CONTINUE = 0xA9,
};
/* MIPI DCS pixel formats */
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/5] drm/dsi: rename MIPI_DCS_SET_PARTIAL_AREA to MIPI_DCS_SET_PARTIAL_ROWS
2019-10-22 10:09 [PATCH 0/5] drm/dsi: cleanups and compression helpers Jani Nikula
` (2 preceding siblings ...)
2019-10-22 10:09 ` [PATCH 3/5] drm/dsi: add missing DSI DCS commands Jani Nikula
@ 2019-10-22 10:09 ` Jani Nikula
2019-10-22 14:31 ` David Lechner
2019-10-22 10:09 ` [PATCH 5/5] drm/dsi: add helpers for DSI compression mode and PPS packets Jani Nikula
4 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2019-10-22 10:09 UTC (permalink / raw)
To: dri-devel; +Cc: jani.nikula, Vandita Kulkarni, intel-gfx, David Lechner
The DCS command has been named SET_PARTIAL_ROWS in the DCS spec since
v1.02, for more than a decade. Rename the enumeration to match the spec.
Cc: David Lechner <david@lechnology.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/tiny/st7586.c | 2 +-
include/video/mipi_display.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tiny/st7586.c b/drivers/gpu/drm/tiny/st7586.c
index 3cc21a1b30c8..060cc756194f 100644
--- a/drivers/gpu/drm/tiny/st7586.c
+++ b/drivers/gpu/drm/tiny/st7586.c
@@ -240,7 +240,7 @@ static void st7586_pipe_enable(struct drm_simple_display_pipe *pipe,
mipi_dbi_command(dbi, ST7586_SET_DISP_DUTY, 0x7f);
mipi_dbi_command(dbi, ST7586_SET_PART_DISP, 0xa0);
- mipi_dbi_command(dbi, MIPI_DCS_SET_PARTIAL_AREA, 0x00, 0x00, 0x00, 0x77);
+ mipi_dbi_command(dbi, MIPI_DCS_SET_PARTIAL_ROWS, 0x00, 0x00, 0x00, 0x77);
mipi_dbi_command(dbi, MIPI_DCS_EXIT_INVERT_MODE);
msleep(100);
diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h
index 928f8c4b6658..e3dc94fe1098 100644
--- a/include/video/mipi_display.h
+++ b/include/video/mipi_display.h
@@ -108,7 +108,7 @@ enum {
MIPI_DCS_WRITE_MEMORY_START = 0x2C,
MIPI_DCS_WRITE_LUT = 0x2D,
MIPI_DCS_READ_MEMORY_START = 0x2E,
- MIPI_DCS_SET_PARTIAL_AREA = 0x30,
+ MIPI_DCS_SET_PARTIAL_ROWS = 0x30,
MIPI_DCS_SET_PARTIAL_COLUMNS = 0x31,
MIPI_DCS_SET_SCROLL_AREA = 0x33,
MIPI_DCS_SET_TEAR_OFF = 0x34,
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/5] drm/dsi: add helpers for DSI compression mode and PPS packets
2019-10-22 10:09 [PATCH 0/5] drm/dsi: cleanups and compression helpers Jani Nikula
` (3 preceding siblings ...)
2019-10-22 10:09 ` [PATCH 4/5] drm/dsi: rename MIPI_DCS_SET_PARTIAL_AREA to MIPI_DCS_SET_PARTIAL_ROWS Jani Nikula
@ 2019-10-22 10:09 ` Jani Nikula
4 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2019-10-22 10:09 UTC (permalink / raw)
To: dri-devel; +Cc: jani.nikula, Vandita Kulkarni, intel-gfx
Add helper functions for sending the DSI compression mode and picture
parameter set data type packets. For the time being, limit the support
to using VESA DSC 1.1 and the default PPS. This may need updating if the
need arises for proprietary compression or non-default PPS, however keep
it simple for starters.
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_mipi_dsi.c | 49 ++++++++++++++++++++++++++++++++++
include/drm/drm_mipi_dsi.h | 4 +++
2 files changed, 53 insertions(+)
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 3f33f02571fd..664ca0833d9c 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -33,6 +33,7 @@
#include <linux/pm_runtime.h>
#include <linux/slab.h>
+#include <drm/drm_dsc.h>
#include <video/mipi_display.h>
/**
@@ -548,6 +549,54 @@ int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi,
}
EXPORT_SYMBOL(mipi_dsi_set_maximum_return_packet_size);
+/**
+ * mipi_dsi_compression_mode() - enable/disable DSC on the peripheral
+ * @dsi: DSI peripheral device
+ * @enable: Whether to enable or disable the DSC
+ *
+ * Enable or disable Display Stream Compression on the peripheral using the
+ * default Picture Parameter Set and VESA DSC 1.1 algorithm.
+ *
+ * Return: 0 on success or a negative error code on failure.
+ */
+ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable)
+{
+ /* Note: Needs updating for non-default PPS or algorithm */
+ u8 tx[2] = { enable << 0, 0 };
+ struct mipi_dsi_msg msg = {
+ .channel = dsi->channel,
+ .type = MIPI_DSI_COMPRESSION_MODE,
+ .tx_len = sizeof(tx),
+ .tx_buf = tx,
+ };
+ int ret = mipi_dsi_device_transfer(dsi, &msg);
+
+ return (ret < 0) ? ret : 0;
+}
+
+/**
+ * mipi_dsi_picture_parameter_set() - transmit the DSC PPS to the peripheral
+ * @dsi: DSI peripheral device
+ * @pps: VESA DSC 1.1 Picture Parameter Set
+ *
+ * Transmit the VESA DSC 1.1 Picture Parameter Set to the peripheral.
+ *
+ * Return: 0 on success or a negative error code on failure.
+ */
+ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi,
+ const struct drm_dsc_picture_parameter_set *pps)
+{
+ struct mipi_dsi_msg msg = {
+ .channel = dsi->channel,
+ .type = MIPI_DSI_PICTURE_PARAMETER_SET,
+ .tx_len = sizeof(*pps),
+ .tx_buf = pps,
+ };
+ int ret = mipi_dsi_device_transfer(dsi, &msg);
+
+ return (ret < 0) ? ret : 0;
+}
+
/**
* mipi_dsi_generic_write() - transmit data using a generic write packet
* @dsi: DSI peripheral device
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 13cf2ae59f6c..360e6377e84b 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -13,6 +13,7 @@
struct mipi_dsi_host;
struct mipi_dsi_device;
+struct drm_dsc_picture_parameter_set;
/* request ACK from peripheral */
#define MIPI_DSI_MSG_REQ_ACK BIT(0)
@@ -228,6 +229,9 @@ int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi);
int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi);
int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi,
u16 value);
+ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable);
+ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi,
+ const struct drm_dsc_picture_parameter_set *pps);
ssize_t mipi_dsi_generic_write(struct mipi_dsi_device *dsi, const void *payload,
size_t size);
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 4/5] drm/dsi: rename MIPI_DCS_SET_PARTIAL_AREA to MIPI_DCS_SET_PARTIAL_ROWS
2019-10-22 10:09 ` [PATCH 4/5] drm/dsi: rename MIPI_DCS_SET_PARTIAL_AREA to MIPI_DCS_SET_PARTIAL_ROWS Jani Nikula
@ 2019-10-22 14:31 ` David Lechner
2019-10-23 7:32 ` Jani Nikula
0 siblings, 1 reply; 10+ messages in thread
From: David Lechner @ 2019-10-22 14:31 UTC (permalink / raw)
To: Jani Nikula, dri-devel; +Cc: Vandita Kulkarni, intel-gfx
On 10/22/19 5:09 AM, Jani Nikula wrote:
> The DCS command has been named SET_PARTIAL_ROWS in the DCS spec since
> v1.02, for more than a decade. Rename the enumeration to match the spec.
>
> Cc: David Lechner <david@lechnology.com>
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
I guess all of my documents are old and say set_partial_area, but I will
take your word for it.
It could be helpful to leave a comment in the code about the renaming
so that if people with old docs search for SET_PARTIAL_AREA, they can
still find it.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/5] drm/dsi: rename MIPI_DCS_SET_PARTIAL_AREA to MIPI_DCS_SET_PARTIAL_ROWS
2019-10-22 14:31 ` David Lechner
@ 2019-10-23 7:32 ` Jani Nikula
0 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2019-10-23 7:32 UTC (permalink / raw)
To: David Lechner, dri-devel; +Cc: intel-gfx
On Tue, 22 Oct 2019, David Lechner <david@lechnology.com> wrote:
> On 10/22/19 5:09 AM, Jani Nikula wrote:
>> The DCS command has been named SET_PARTIAL_ROWS in the DCS spec since
>> v1.02, for more than a decade. Rename the enumeration to match the spec.
>>
>> Cc: David Lechner <david@lechnology.com>
>> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>
> I guess all of my documents are old and say set_partial_area, but I will
> take your word for it.
>
> It could be helpful to leave a comment in the code about the renaming
> so that if people with old docs search for SET_PARTIAL_AREA, they can
> still find it.
Something like this?
MIPI_DCS_SET_PARTIAL_ROWS = 0x30, /* aka MIPI_DCS_SET_PARTIAL_AREA */
It's also a possibility to define both:
MIPI_DCS_SET_PARTIAL_AREA = 0x30, /* _ROWS since MIPI DCS 1.02 */
MIPI_DCS_SET_PARTIAL_ROWS = 0x30,
I don't mind either way.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/5] drm/dsi: clean up DSI data type definitions
2019-10-22 10:09 ` [PATCH 1/5] drm/dsi: clean up DSI data type definitions Jani Nikula
@ 2019-10-24 7:56 ` Kulkarni, Vandita
2019-10-24 7:56 ` Kulkarni, Vandita
0 siblings, 1 reply; 10+ messages in thread
From: Kulkarni, Vandita @ 2019-10-24 7:56 UTC (permalink / raw)
To: dri-devel@lists.freedesktop.org
Cc: Nikula, Jani, intel-gfx@lists.freedesktop.org
Looks good to me.
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
> -----Original Message-----
> From: Jani Nikula <jani.nikula@intel.com>
> Sent: Tuesday, October 22, 2019 3:40 PM
> To: dri-devel@lists.freedesktop.org
> Cc: intel-gfx@lists.freedesktop.org; Nikula, Jani <jani.nikula@intel.com>;
> Kulkarni, Vandita <vandita.kulkarni@intel.com>
> Subject: [PATCH 1/5] drm/dsi: clean up DSI data type definitions
>
> Rename picture parameter set (it's a long packet, not a long write) and
> compression mode (it's not a DCS command) enumerations according to the
> DSI specification. Order the types according to the spec. Use tabs instead of
> spaces for indentation. Use all lower case for hex.
>
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_mipi_dsi.c | 4 ++--
> include/video/mipi_display.h | 10 +++++-----
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c
> b/drivers/gpu/drm/drm_mipi_dsi.c index bd2498bbd74a..f237d80828c3
> 100644
> --- a/drivers/gpu/drm/drm_mipi_dsi.c
> +++ b/drivers/gpu/drm/drm_mipi_dsi.c
> @@ -373,6 +373,7 @@ bool mipi_dsi_packet_format_is_short(u8 type)
> case MIPI_DSI_V_SYNC_END:
> case MIPI_DSI_H_SYNC_START:
> case MIPI_DSI_H_SYNC_END:
> + case MIPI_DSI_COMPRESSION_MODE:
> case MIPI_DSI_END_OF_TRANSMISSION:
> case MIPI_DSI_COLOR_MODE_OFF:
> case MIPI_DSI_COLOR_MODE_ON:
> @@ -387,7 +388,6 @@ bool mipi_dsi_packet_format_is_short(u8 type)
> case MIPI_DSI_DCS_SHORT_WRITE:
> case MIPI_DSI_DCS_SHORT_WRITE_PARAM:
> case MIPI_DSI_DCS_READ:
> - case MIPI_DSI_DCS_COMPRESSION_MODE:
> case MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE:
> return true;
> }
> @@ -406,11 +406,11 @@
> EXPORT_SYMBOL(mipi_dsi_packet_format_is_short);
> bool mipi_dsi_packet_format_is_long(u8 type) {
> switch (type) {
> - case MIPI_DSI_PPS_LONG_WRITE:
> case MIPI_DSI_NULL_PACKET:
> case MIPI_DSI_BLANKING_PACKET:
> case MIPI_DSI_GENERIC_LONG_WRITE:
> case MIPI_DSI_DCS_LONG_WRITE:
> + case MIPI_DSI_PICTURE_PARAMETER_SET:
> case MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20:
> case MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24:
> case MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16:
> diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h
> index cba57a678daf..79fd71cf4934 100644
> --- a/include/video/mipi_display.h
> +++ b/include/video/mipi_display.h
> @@ -17,6 +17,9 @@ enum {
> MIPI_DSI_H_SYNC_START = 0x21,
> MIPI_DSI_H_SYNC_END = 0x31,
>
> + MIPI_DSI_COMPRESSION_MODE = 0x07,
> + MIPI_DSI_END_OF_TRANSMISSION = 0x08,
> +
> MIPI_DSI_COLOR_MODE_OFF = 0x02,
> MIPI_DSI_COLOR_MODE_ON = 0x12,
> MIPI_DSI_SHUTDOWN_PERIPHERAL = 0x22,
> @@ -35,18 +38,15 @@ enum {
>
> MIPI_DSI_DCS_READ = 0x06,
>
> - MIPI_DSI_DCS_COMPRESSION_MODE = 0x07,
> - MIPI_DSI_PPS_LONG_WRITE = 0x0A,
> -
> MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE =
> 0x37,
>
> - MIPI_DSI_END_OF_TRANSMISSION = 0x08,
> -
> MIPI_DSI_NULL_PACKET = 0x09,
> MIPI_DSI_BLANKING_PACKET = 0x19,
> MIPI_DSI_GENERIC_LONG_WRITE = 0x29,
> MIPI_DSI_DCS_LONG_WRITE = 0x39,
>
> + MIPI_DSI_PICTURE_PARAMETER_SET = 0x0a,
> +
> MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20 = 0x0c,
> MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24 = 0x1c,
> MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16 = 0x2c,
> --
> 2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/5] drm/dsi: clean up DSI data type definitions
2019-10-24 7:56 ` Kulkarni, Vandita
@ 2019-10-24 7:56 ` Kulkarni, Vandita
0 siblings, 0 replies; 10+ messages in thread
From: Kulkarni, Vandita @ 2019-10-24 7:56 UTC (permalink / raw)
To: Nikula, Jani, dri-devel@lists.freedesktop.org
Cc: Nikula, Jani, intel-gfx@lists.freedesktop.org
Looks good to me.
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
> -----Original Message-----
> From: Jani Nikula <jani.nikula@intel.com>
> Sent: Tuesday, October 22, 2019 3:40 PM
> To: dri-devel@lists.freedesktop.org
> Cc: intel-gfx@lists.freedesktop.org; Nikula, Jani <jani.nikula@intel.com>;
> Kulkarni, Vandita <vandita.kulkarni@intel.com>
> Subject: [PATCH 1/5] drm/dsi: clean up DSI data type definitions
>
> Rename picture parameter set (it's a long packet, not a long write) and
> compression mode (it's not a DCS command) enumerations according to the
> DSI specification. Order the types according to the spec. Use tabs instead of
> spaces for indentation. Use all lower case for hex.
>
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_mipi_dsi.c | 4 ++--
> include/video/mipi_display.h | 10 +++++-----
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c
> b/drivers/gpu/drm/drm_mipi_dsi.c index bd2498bbd74a..f237d80828c3
> 100644
> --- a/drivers/gpu/drm/drm_mipi_dsi.c
> +++ b/drivers/gpu/drm/drm_mipi_dsi.c
> @@ -373,6 +373,7 @@ bool mipi_dsi_packet_format_is_short(u8 type)
> case MIPI_DSI_V_SYNC_END:
> case MIPI_DSI_H_SYNC_START:
> case MIPI_DSI_H_SYNC_END:
> + case MIPI_DSI_COMPRESSION_MODE:
> case MIPI_DSI_END_OF_TRANSMISSION:
> case MIPI_DSI_COLOR_MODE_OFF:
> case MIPI_DSI_COLOR_MODE_ON:
> @@ -387,7 +388,6 @@ bool mipi_dsi_packet_format_is_short(u8 type)
> case MIPI_DSI_DCS_SHORT_WRITE:
> case MIPI_DSI_DCS_SHORT_WRITE_PARAM:
> case MIPI_DSI_DCS_READ:
> - case MIPI_DSI_DCS_COMPRESSION_MODE:
> case MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE:
> return true;
> }
> @@ -406,11 +406,11 @@
> EXPORT_SYMBOL(mipi_dsi_packet_format_is_short);
> bool mipi_dsi_packet_format_is_long(u8 type) {
> switch (type) {
> - case MIPI_DSI_PPS_LONG_WRITE:
> case MIPI_DSI_NULL_PACKET:
> case MIPI_DSI_BLANKING_PACKET:
> case MIPI_DSI_GENERIC_LONG_WRITE:
> case MIPI_DSI_DCS_LONG_WRITE:
> + case MIPI_DSI_PICTURE_PARAMETER_SET:
> case MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20:
> case MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24:
> case MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16:
> diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h
> index cba57a678daf..79fd71cf4934 100644
> --- a/include/video/mipi_display.h
> +++ b/include/video/mipi_display.h
> @@ -17,6 +17,9 @@ enum {
> MIPI_DSI_H_SYNC_START = 0x21,
> MIPI_DSI_H_SYNC_END = 0x31,
>
> + MIPI_DSI_COMPRESSION_MODE = 0x07,
> + MIPI_DSI_END_OF_TRANSMISSION = 0x08,
> +
> MIPI_DSI_COLOR_MODE_OFF = 0x02,
> MIPI_DSI_COLOR_MODE_ON = 0x12,
> MIPI_DSI_SHUTDOWN_PERIPHERAL = 0x22,
> @@ -35,18 +38,15 @@ enum {
>
> MIPI_DSI_DCS_READ = 0x06,
>
> - MIPI_DSI_DCS_COMPRESSION_MODE = 0x07,
> - MIPI_DSI_PPS_LONG_WRITE = 0x0A,
> -
> MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE =
> 0x37,
>
> - MIPI_DSI_END_OF_TRANSMISSION = 0x08,
> -
> MIPI_DSI_NULL_PACKET = 0x09,
> MIPI_DSI_BLANKING_PACKET = 0x19,
> MIPI_DSI_GENERIC_LONG_WRITE = 0x29,
> MIPI_DSI_DCS_LONG_WRITE = 0x39,
>
> + MIPI_DSI_PICTURE_PARAMETER_SET = 0x0a,
> +
> MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20 = 0x0c,
> MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24 = 0x1c,
> MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16 = 0x2c,
> --
> 2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-10-24 7:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-22 10:09 [PATCH 0/5] drm/dsi: cleanups and compression helpers Jani Nikula
2019-10-22 10:09 ` [PATCH 1/5] drm/dsi: clean up DSI data type definitions Jani Nikula
2019-10-24 7:56 ` Kulkarni, Vandita
2019-10-24 7:56 ` Kulkarni, Vandita
2019-10-22 10:09 ` [PATCH 2/5] drm/dsi: add missing DSI data types Jani Nikula
2019-10-22 10:09 ` [PATCH 3/5] drm/dsi: add missing DSI DCS commands Jani Nikula
2019-10-22 10:09 ` [PATCH 4/5] drm/dsi: rename MIPI_DCS_SET_PARTIAL_AREA to MIPI_DCS_SET_PARTIAL_ROWS Jani Nikula
2019-10-22 14:31 ` David Lechner
2019-10-23 7:32 ` Jani Nikula
2019-10-22 10:09 ` [PATCH 5/5] drm/dsi: add helpers for DSI compression mode and PPS packets Jani Nikula
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).