drm/panel: Changes for v3.16-rc1
This set of commits contains a couple of fixes to existing panel drivers and support for some new panels. One commit touches the DRM core in that in modifies the MIPI DSI support to hook up the shutdown function so that drivers can provide code that's run on shutdown. This is used by a subsequent commit to make the simple panel driver power off the backlight on shutdown. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTlYqjAAoJEN0jrNd/PrOhnWUQAKbNwzzfIaUXVwZwWSSJFeGT 91x2ZDbI51tJKvGG8tIXKaRfkw2bngvdx+rGiPncgBtw75R4/S2MPypKU3osxKUf QSf8PptHNJ+wGyIZJDlpP91t6gZ89U/qWEvcMCX8b6me9LR228kaEd4rQ/wChHso D99h7Zlhb3UeUPd63BTCyPEbXyEVrgUQn1P2b72hYCS2lpR+2SpLcpSvqwIz5ZlW iRBkXr2ME/aDI0+vGMlIQm7zCijVbaWRF/N3v+/uu5IxhCQhwNlkcWGVuIzABl7P BDaXbnsZSXsFopdB/S2zgpRRJcRfccVpwCCHQqAuOSej522LxfL7sz7vD48PqDHi vzyNk46YFe5n1Ov35m1aE/VTi/mtU7vcwKkUQX8EfS9dDe0eF6mIugng7CmOaKCf Krd/wDFVSsbRhCDzogQVwylPQtOQ76oqFhSCQwTvl4PM0SOu+KtmUyO2xOcSv34/ uP/5rVaSww3qkn6hnW53IRJcEdwFV3IwbdkV9dwKLA5WWtHLiHiZd8F9viW7tKRl UEA38UIWivkfhbSIwHMzmUlUEcBAHitlZg3N5fb1OHQT/rJGD3wNmvJNQC3vG3ej 1os7D8V7nBID6ml/oYkUZSmcgqN7ywz5ZtSn4hJm9+uwie10wn36Wv4iYbT7SAsm nUFDBceAAN7QplgTx33m =PWCS -----END PGP SIGNATURE----- Merge tag 'drm/panel/for-3.16-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/panel: Changes for v3.16-rc1 This set of commits contains a couple of fixes to existing panel drivers and support for some new panels. One commit touches the DRM core in that in modifies the MIPI DSI support to hook up the shutdown function so that drivers can provide code that's run on shutdown. This is used by a subsequent commit to make the simple panel driver power off the backlight on shutdown. * tag 'drm/panel/for-3.16-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: simple - Add AUO B133XTN01 panel support drm/panel: simple - Disable panel on shutdown drm/panel: add support for EDT ET057090DHU panel drm/panel: Add support for EDT ETM0700G0DH6 and ET070080DH6 panels drm/panel: ld9040: add power control sequence drm/panel: s6e8aa0: silence array overflow warning drm/dsi: Support device shutdown
This commit is contained in:
Коммит
5330fb4129
|
@ -0,0 +1,7 @@
|
|||
AU Optronics Corporation 13.3" WXGA (1366x768) TFT LCD panel
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "auo,b133xtn01"
|
||||
|
||||
This binding is compatible with the simple-panel binding, which is specified
|
||||
in simple-panel.txt in this directory.
|
|
@ -0,0 +1,7 @@
|
|||
Emerging Display Technology Corp. 5.7" VGA TFT LCD panel
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "edt,et057090dhu"
|
||||
|
||||
This binding is compatible with the simple-panel binding, which is specified
|
||||
in simple-panel.txt in this directory.
|
|
@ -0,0 +1,10 @@
|
|||
Emerging Display Technology Corp. ET070080DH6 7.0" WVGA TFT LCD panel
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "edt,et070080dh6"
|
||||
|
||||
This panel is the same as ETM0700G0DH6 except for the touchscreen.
|
||||
ET070080DH6 is the model with resistive touch.
|
||||
|
||||
This binding is compatible with the simple-panel binding, which is specified
|
||||
in simple-panel.txt in this directory.
|
|
@ -0,0 +1,10 @@
|
|||
Emerging Display Technology Corp. ETM0700G0DH6 7.0" WVGA TFT LCD panel
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "edt,etm0700g0dh6"
|
||||
|
||||
This panel is the same as ET070080DH6 except for the touchscreen.
|
||||
ETM0700G0DH6 is the model with capacitive multitouch.
|
||||
|
||||
This binding is compatible with the simple-panel binding, which is specified
|
||||
in simple-panel.txt in this directory.
|
|
@ -282,6 +282,14 @@ static int mipi_dsi_drv_remove(struct device *dev)
|
|||
return drv->remove(dsi);
|
||||
}
|
||||
|
||||
static void mipi_dsi_drv_shutdown(struct device *dev)
|
||||
{
|
||||
struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver);
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev);
|
||||
|
||||
drv->shutdown(dsi);
|
||||
}
|
||||
|
||||
/**
|
||||
* mipi_dsi_driver_register - register a driver for DSI devices
|
||||
* @drv: DSI driver structure
|
||||
|
@ -293,6 +301,8 @@ int mipi_dsi_driver_register(struct mipi_dsi_driver *drv)
|
|||
drv->driver.probe = mipi_dsi_drv_probe;
|
||||
if (drv->remove)
|
||||
drv->driver.remove = mipi_dsi_drv_remove;
|
||||
if (drv->shutdown)
|
||||
drv->driver.shutdown = mipi_dsi_drv_shutdown;
|
||||
|
||||
return driver_register(&drv->driver);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#define MCS_ELVSS_ON 0xb1
|
||||
#define MCS_USER_SETTING 0xf0
|
||||
#define MCS_DISPCTL 0xf2
|
||||
#define MCS_POWER_CTRL 0xf4
|
||||
#define MCS_GTCON 0xf7
|
||||
#define MCS_PANEL_CONDITION 0xf8
|
||||
#define MCS_GAMMA_SET1 0xf9
|
||||
|
@ -182,6 +183,8 @@ static void ld9040_init(struct ld9040 *ctx)
|
|||
ld9040_dcs_write_seq_static(ctx, MCS_DISPCTL,
|
||||
0x02, 0x08, 0x08, 0x10, 0x10);
|
||||
ld9040_dcs_write_seq_static(ctx, MCS_MANPWR, 0x04);
|
||||
ld9040_dcs_write_seq_static(ctx, MCS_POWER_CTRL,
|
||||
0x0a, 0x87, 0x25, 0x6a, 0x44, 0x02, 0x88);
|
||||
ld9040_dcs_write_seq_static(ctx, MCS_ELVSS_ON, 0x0d, 0x00, 0x16);
|
||||
ld9040_dcs_write_seq_static(ctx, MCS_GTCON, 0x09, 0x00, 0x00);
|
||||
ld9040_brightness_set(ctx);
|
||||
|
|
|
@ -847,6 +847,7 @@ static void s6e8aa0_read_mtp_id(struct s6e8aa0 *ctx)
|
|||
if (i >= ARRAY_SIZE(s6e8aa0_variants)) {
|
||||
dev_err(ctx->dev, "unsupported display version %d\n", id[1]);
|
||||
ctx->error = -EINVAL;
|
||||
return;
|
||||
}
|
||||
|
||||
ctx->variant = &s6e8aa0_variants[i];
|
||||
|
|
|
@ -262,6 +262,13 @@ static int panel_simple_remove(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void panel_simple_shutdown(struct device *dev)
|
||||
{
|
||||
struct panel_simple *panel = dev_get_drvdata(dev);
|
||||
|
||||
panel_simple_disable(&panel->base);
|
||||
}
|
||||
|
||||
static const struct drm_display_mode auo_b101aw03_mode = {
|
||||
.clock = 51450,
|
||||
.hdisplay = 1024,
|
||||
|
@ -284,6 +291,28 @@ static const struct panel_desc auo_b101aw03 = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct drm_display_mode auo_b133xtn01_mode = {
|
||||
.clock = 69500,
|
||||
.hdisplay = 1366,
|
||||
.hsync_start = 1366 + 48,
|
||||
.hsync_end = 1366 + 48 + 32,
|
||||
.htotal = 1366 + 48 + 32 + 20,
|
||||
.vdisplay = 768,
|
||||
.vsync_start = 768 + 3,
|
||||
.vsync_end = 768 + 3 + 6,
|
||||
.vtotal = 768 + 3 + 6 + 13,
|
||||
.vrefresh = 60,
|
||||
};
|
||||
|
||||
static const struct panel_desc auo_b133xtn01 = {
|
||||
.modes = &auo_b133xtn01_mode,
|
||||
.num_modes = 1,
|
||||
.size = {
|
||||
.width = 293,
|
||||
.height = 165,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
|
||||
.clock = 72070,
|
||||
.hdisplay = 1366,
|
||||
|
@ -328,6 +357,52 @@ static const struct panel_desc chunghwa_claa101wb01 = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct drm_display_mode edt_et057090dhu_mode = {
|
||||
.clock = 25175,
|
||||
.hdisplay = 640,
|
||||
.hsync_start = 640 + 16,
|
||||
.hsync_end = 640 + 16 + 30,
|
||||
.htotal = 640 + 16 + 30 + 114,
|
||||
.vdisplay = 480,
|
||||
.vsync_start = 480 + 10,
|
||||
.vsync_end = 480 + 10 + 3,
|
||||
.vtotal = 480 + 10 + 3 + 32,
|
||||
.vrefresh = 60,
|
||||
.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
|
||||
};
|
||||
|
||||
static const struct panel_desc edt_et057090dhu = {
|
||||
.modes = &edt_et057090dhu_mode,
|
||||
.num_modes = 1,
|
||||
.size = {
|
||||
.width = 115,
|
||||
.height = 86,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct drm_display_mode edt_etm0700g0dh6_mode = {
|
||||
.clock = 33260,
|
||||
.hdisplay = 800,
|
||||
.hsync_start = 800 + 40,
|
||||
.hsync_end = 800 + 40 + 128,
|
||||
.htotal = 800 + 40 + 128 + 88,
|
||||
.vdisplay = 480,
|
||||
.vsync_start = 480 + 10,
|
||||
.vsync_end = 480 + 10 + 2,
|
||||
.vtotal = 480 + 10 + 2 + 33,
|
||||
.vrefresh = 60,
|
||||
.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
};
|
||||
|
||||
static const struct panel_desc edt_etm0700g0dh6 = {
|
||||
.modes = &edt_etm0700g0dh6_mode,
|
||||
.num_modes = 1,
|
||||
.size = {
|
||||
.width = 152,
|
||||
.height = 91,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct drm_display_mode lg_lp129qe_mode = {
|
||||
.clock = 285250,
|
||||
.hdisplay = 2560,
|
||||
|
@ -376,12 +451,24 @@ static const struct of_device_id platform_of_match[] = {
|
|||
{
|
||||
.compatible = "auo,b101aw03",
|
||||
.data = &auo_b101aw03,
|
||||
}, {
|
||||
.compatible = "auo,b133xtn01",
|
||||
.data = &auo_b133xtn01,
|
||||
}, {
|
||||
.compatible = "chunghwa,claa101wa01a",
|
||||
.data = &chunghwa_claa101wa01a
|
||||
}, {
|
||||
.compatible = "chunghwa,claa101wb01",
|
||||
.data = &chunghwa_claa101wb01
|
||||
}, {
|
||||
.compatible = "edt,et057090dhu",
|
||||
.data = &edt_et057090dhu,
|
||||
}, {
|
||||
.compatible = "edt,et070080dh6",
|
||||
.data = &edt_etm0700g0dh6,
|
||||
}, {
|
||||
.compatible = "edt,etm0700g0dh6",
|
||||
.data = &edt_etm0700g0dh6,
|
||||
}, {
|
||||
.compatible = "lg,lp129qe",
|
||||
.data = &lg_lp129qe,
|
||||
|
@ -412,6 +499,11 @@ static int panel_simple_platform_remove(struct platform_device *pdev)
|
|||
return panel_simple_remove(&pdev->dev);
|
||||
}
|
||||
|
||||
static void panel_simple_platform_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
panel_simple_shutdown(&pdev->dev);
|
||||
}
|
||||
|
||||
static struct platform_driver panel_simple_platform_driver = {
|
||||
.driver = {
|
||||
.name = "panel-simple",
|
||||
|
@ -420,6 +512,7 @@ static struct platform_driver panel_simple_platform_driver = {
|
|||
},
|
||||
.probe = panel_simple_platform_probe,
|
||||
.remove = panel_simple_platform_remove,
|
||||
.shutdown = panel_simple_platform_shutdown,
|
||||
};
|
||||
|
||||
struct panel_desc_dsi {
|
||||
|
@ -561,6 +654,11 @@ static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
|
|||
return panel_simple_remove(&dsi->dev);
|
||||
}
|
||||
|
||||
static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
|
||||
{
|
||||
panel_simple_shutdown(&dsi->dev);
|
||||
}
|
||||
|
||||
static struct mipi_dsi_driver panel_simple_dsi_driver = {
|
||||
.driver = {
|
||||
.name = "panel-simple-dsi",
|
||||
|
@ -569,6 +667,7 @@ static struct mipi_dsi_driver panel_simple_dsi_driver = {
|
|||
},
|
||||
.probe = panel_simple_dsi_probe,
|
||||
.remove = panel_simple_dsi_remove,
|
||||
.shutdown = panel_simple_dsi_shutdown,
|
||||
};
|
||||
|
||||
static int __init panel_simple_init(void)
|
||||
|
|
|
@ -135,11 +135,13 @@ ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, unsigned int channel,
|
|||
* @driver: device driver model driver
|
||||
* @probe: callback for device binding
|
||||
* @remove: callback for device unbinding
|
||||
* @shutdown: called at shutdown time to quiesce the device
|
||||
*/
|
||||
struct mipi_dsi_driver {
|
||||
struct device_driver driver;
|
||||
int(*probe)(struct mipi_dsi_device *dsi);
|
||||
int(*remove)(struct mipi_dsi_device *dsi);
|
||||
void (*shutdown)(struct mipi_dsi_device *dsi);
|
||||
};
|
||||
|
||||
#define to_mipi_dsi_driver(d) container_of(d, struct mipi_dsi_driver, driver)
|
||||
|
|
Загрузка…
Ссылка в новой задаче