summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2016-08-24 13:28:39 +0200
committerThierry Reding <treding@nvidia.com>2016-08-24 13:33:24 +0200
commitbbdcf516a6187d58639084f1b9f92cde50cc07ad (patch)
treeaf318a426ba0bf5651f3e8fd1c817b7159dc2fcb
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
downloadlinux-bbdcf516a6187d58639084f1b9f92cde50cc07ad.tar.gz
linux-bbdcf516a6187d58639084f1b9f92cde50cc07ad.tar.bz2
linux-bbdcf516a6187d58639084f1b9f92cde50cc07ad.zip
drm/dsi: Order DCS helpers by command code
Most of these helpers had been introduced in the correct order, but some were simply appended, which wasn't detected when they were applied. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/drm_mipi_dsi.c34
-rw-r--r--include/drm/drm_mipi_dsi.h2
2 files changed, 18 insertions, 18 deletions
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index af0d471ee246..8e56228fb1fb 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -999,47 +999,47 @@ int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi,
EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_on);
/**
- * mipi_dsi_dcs_set_tear_scanline() - set the scanline to use as trigger for
- * the Tearing Effect output signal of the display module
+ * mipi_dsi_dcs_set_pixel_format() - sets the pixel format for the RGB image
+ * data used by the interface
* @dsi: DSI peripheral device
- * @scanline: scanline to use as trigger
+ * @format: pixel format
*
- * Return: 0 on success or a negative error code on failure
+ * Return: 0 on success or a negative error code on failure.
*/
-int mipi_dsi_dcs_set_tear_scanline(struct mipi_dsi_device *dsi, u16 scanline)
+int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format)
{
- u8 payload[3] = { MIPI_DCS_SET_TEAR_SCANLINE, scanline >> 8,
- scanline & 0xff };
ssize_t err;
- err = mipi_dsi_generic_write(dsi, payload, sizeof(payload));
+ err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_PIXEL_FORMAT, &format,
+ sizeof(format));
if (err < 0)
return err;
return 0;
}
-EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_scanline);
+EXPORT_SYMBOL(mipi_dsi_dcs_set_pixel_format);
/**
- * mipi_dsi_dcs_set_pixel_format() - sets the pixel format for the RGB image
- * data used by the interface
+ * mipi_dsi_dcs_set_tear_scanline() - set the scanline to use as trigger for
+ * the Tearing Effect output signal of the display module
* @dsi: DSI peripheral device
- * @format: pixel format
+ * @scanline: scanline to use as trigger
*
- * Return: 0 on success or a negative error code on failure.
+ * Return: 0 on success or a negative error code on failure
*/
-int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format)
+int mipi_dsi_dcs_set_tear_scanline(struct mipi_dsi_device *dsi, u16 scanline)
{
+ u8 payload[3] = { MIPI_DCS_SET_TEAR_SCANLINE, scanline >> 8,
+ scanline & 0xff };
ssize_t err;
- err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_PIXEL_FORMAT, &format,
- sizeof(format));
+ err = mipi_dsi_generic_write(dsi, payload, sizeof(payload));
if (err < 0)
return err;
return 0;
}
-EXPORT_SYMBOL(mipi_dsi_dcs_set_pixel_format);
+EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_scanline);
static int mipi_dsi_drv_probe(struct device *dev)
{
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 47ac92584d76..4ba9dfc01825 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -265,11 +265,11 @@ int mipi_dsi_dcs_set_column_address(struct mipi_dsi_device *dsi, u16 start,
u16 end);
int mipi_dsi_dcs_set_page_address(struct mipi_dsi_device *dsi, u16 start,
u16 end);
-int mipi_dsi_dcs_set_tear_scanline(struct mipi_dsi_device *dsi, u16 scanline);
int mipi_dsi_dcs_set_tear_off(struct mipi_dsi_device *dsi);
int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi,
enum mipi_dsi_dcs_tear_mode mode);
int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format);
+int mipi_dsi_dcs_set_tear_scanline(struct mipi_dsi_device *dsi, u16 scanline);
/**
* struct mipi_dsi_driver - DSI driver