summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-06-18 12:55:03 +1000
committerDave Airlie <airlied@redhat.com>2015-06-18 12:55:03 +1000
commit2aeab6884b77459029f37a1d7f741a296e5c3f5f (patch)
tree724261d8f2e1cc12553563ccd8b1786911ad5ef8
parentc861acc4d5fc249a0febf38dfebbb431b21628dd (diff)
parent4946b0430c6933383d33adf101529b7085a4a682 (diff)
downloadop-kernel-dev-2aeab6884b77459029f37a1d7f741a296e5c3f5f.zip
op-kernel-dev-2aeab6884b77459029f37a1d7f741a296e5c3f5f.tar.gz
Merge tag 'drm/panel/for-4.2-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next
drm/panel: Changes for v4.2-rc1 This contains fixes for the long-standing build issues that some of the bridge drivers were exposing. Other than that it's mostly cleanup and a couple of new simple panels that are supported. * tag 'drm/panel/for-4.2-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: simple: Add bus format for HannStar HSD100PXN1 drm/panel: simple: Add display timing for HannStar HSD100PXN1 drm/panel: ld9040: Remove useless padding drm/panel: Constify OF match tables drm/bridge: Remove stale ptn3460.h include drm/bridge: ps8622: Include linux/gpio/consumer.h drm/bridge: ptn3460: Include linux/gpio/consumer.h drm/bridge: dw-hdmi: Return number of EDID modes drm/panel: simple: Add support for LG LB070WV8 800x480 7" panel drm/bridge: ptn3460: Pass flags to devm_gpiod_get() drm/bridge: ps8622: Pass flags to devm_gpiod_get() drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias drm/bridge: dw-hdmi: Staticize dw_hdmi_bridge_funcs
-rw-r--r--Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/lg,lb070wv8.txt7
-rw-r--r--drivers/gpu/drm/bridge/dw_hdmi.c6
-rw-r--r--drivers/gpu/drm/bridge/ps8622.c21
-rw-r--r--drivers/gpu/drm/bridge/ptn3460.c28
-rw-r--r--drivers/gpu/drm/exynos/exynos_dp_core.c1
-rw-r--r--drivers/gpu/drm/panel/panel-ld9040.c10
-rw-r--r--drivers/gpu/drm/panel/panel-s6e8aa0.c2
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c54
-rw-r--r--include/drm/bridge/ptn3460.h45
10 files changed, 92 insertions, 89 deletions
diff --git a/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt b/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt
new file mode 100644
index 0000000..8270319
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt
@@ -0,0 +1,7 @@
+HannStar Display Corp. HSD100PXN1 10.1" XGA LVDS panel
+
+Required properties:
+- compatible: should be "hannstar,hsd100pxn1"
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt b/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt
new file mode 100644
index 0000000..a7588e5
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt
@@ -0,0 +1,7 @@
+LG 7" (800x480 pixels) TFT LCD panel
+
+Required properties:
+- compatible: should be "lg,lb070wv8"
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
index 49cafb6..816d104 100644
--- a/drivers/gpu/drm/bridge/dw_hdmi.c
+++ b/drivers/gpu/drm/bridge/dw_hdmi.c
@@ -1395,7 +1395,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,
connector);
struct edid *edid;
- int ret;
+ int ret = 0;
if (!hdmi->ddc)
return 0;
@@ -1412,7 +1412,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
dev_dbg(hdmi->dev, "failed to get edid\n");
}
- return 0;
+ return ret;
}
static enum drm_mode_status
@@ -1457,7 +1457,7 @@ static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = {
.best_encoder = dw_hdmi_connector_best_encoder,
};
-struct drm_bridge_funcs dw_hdmi_bridge_funcs = {
+static struct drm_bridge_funcs dw_hdmi_bridge_funcs = {
.enable = dw_hdmi_bridge_enable,
.disable = dw_hdmi_bridge_disable,
.pre_enable = dw_hdmi_bridge_nop,
diff --git a/drivers/gpu/drm/bridge/ps8622.c b/drivers/gpu/drm/bridge/ps8622.c
index e895aa7..32c4601 100644
--- a/drivers/gpu/drm/bridge/ps8622.c
+++ b/drivers/gpu/drm/bridge/ps8622.c
@@ -18,6 +18,7 @@
#include <linux/err.h>
#include <linux/fb.h>
#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
@@ -581,31 +582,21 @@ static int ps8622_probe(struct i2c_client *client,
ps8622->v12 = NULL;
}
- ps8622->gpio_slp = devm_gpiod_get(dev, "sleep");
+ ps8622->gpio_slp = devm_gpiod_get(dev, "sleep", GPIOD_OUT_HIGH);
if (IS_ERR(ps8622->gpio_slp)) {
ret = PTR_ERR(ps8622->gpio_slp);
dev_err(dev, "cannot get gpio_slp %d\n", ret);
return ret;
}
- ret = gpiod_direction_output(ps8622->gpio_slp, 1);
- if (ret) {
- dev_err(dev, "cannot configure gpio_slp\n");
- return ret;
- }
- ps8622->gpio_rst = devm_gpiod_get(dev, "reset");
- if (IS_ERR(ps8622->gpio_rst)) {
- ret = PTR_ERR(ps8622->gpio_rst);
- dev_err(dev, "cannot get gpio_rst %d\n", ret);
- return ret;
- }
/*
* Assert the reset pin high to avoid the bridge being
* initialized prematurely
*/
- ret = gpiod_direction_output(ps8622->gpio_rst, 1);
- if (ret) {
- dev_err(dev, "cannot configure gpio_rst\n");
+ ps8622->gpio_rst = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
+ if (IS_ERR(ps8622->gpio_rst)) {
+ ret = PTR_ERR(ps8622->gpio_rst);
+ dev_err(dev, "cannot get gpio_rst %d\n", ret);
return ret;
}
diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c
index 9d2f053..0e08156 100644
--- a/drivers/gpu/drm/bridge/ptn3460.c
+++ b/drivers/gpu/drm/bridge/ptn3460.c
@@ -15,6 +15,7 @@
#include <linux/delay.h>
#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
@@ -23,8 +24,6 @@
#include <drm/drm_panel.h>
-#include "bridge/ptn3460.h"
-
#include "drm_crtc.h"
#include "drm_crtc_helper.h"
#include "drm_edid.h"
@@ -330,32 +329,23 @@ static int ptn3460_probe(struct i2c_client *client,
ptn_bridge->client = client;
- ptn_bridge->gpio_pd_n = devm_gpiod_get(&client->dev, "powerdown");
+ ptn_bridge->gpio_pd_n = devm_gpiod_get(&client->dev, "powerdown",
+ GPIOD_OUT_HIGH);
if (IS_ERR(ptn_bridge->gpio_pd_n)) {
ret = PTR_ERR(ptn_bridge->gpio_pd_n);
dev_err(dev, "cannot get gpio_pd_n %d\n", ret);
return ret;
}
- ret = gpiod_direction_output(ptn_bridge->gpio_pd_n, 1);
- if (ret) {
- DRM_ERROR("cannot configure gpio_pd_n\n");
- return ret;
- }
-
- ptn_bridge->gpio_rst_n = devm_gpiod_get(&client->dev, "reset");
- if (IS_ERR(ptn_bridge->gpio_rst_n)) {
- ret = PTR_ERR(ptn_bridge->gpio_rst_n);
- DRM_ERROR("cannot get gpio_rst_n %d\n", ret);
- return ret;
- }
/*
* Request the reset pin low to avoid the bridge being
* initialized prematurely
*/
- ret = gpiod_direction_output(ptn_bridge->gpio_rst_n, 0);
- if (ret) {
- DRM_ERROR("cannot configure gpio_rst_n\n");
+ ptn_bridge->gpio_rst_n = devm_gpiod_get(&client->dev, "reset",
+ GPIOD_OUT_LOW);
+ if (IS_ERR(ptn_bridge->gpio_rst_n)) {
+ ret = PTR_ERR(ptn_bridge->gpio_rst_n);
+ DRM_ERROR("cannot get gpio_rst_n %d\n", ret);
return ret;
}
@@ -389,7 +379,7 @@ static int ptn3460_remove(struct i2c_client *client)
}
static const struct i2c_device_id ptn3460_i2c_table[] = {
- {"nxp,ptn3460", 0},
+ {"ptn3460", 0},
{},
};
MODULE_DEVICE_TABLE(i2c, ptn3460_i2c_table);
diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c
index 30feb7d..15b0865 100644
--- a/drivers/gpu/drm/exynos/exynos_dp_core.c
+++ b/drivers/gpu/drm/exynos/exynos_dp_core.c
@@ -29,7 +29,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_panel.h>
-#include <drm/bridge/ptn3460.h>
#include "exynos_dp_core.h"
diff --git a/drivers/gpu/drm/panel/panel-ld9040.c b/drivers/gpu/drm/panel/panel-ld9040.c
index 08cf2c5..9c27bde 100644
--- a/drivers/gpu/drm/panel/panel-ld9040.c
+++ b/drivers/gpu/drm/panel/panel-ld9040.c
@@ -367,18 +367,18 @@ static int ld9040_remove(struct spi_device *spi)
return 0;
}
-static struct of_device_id ld9040_of_match[] = {
+static const struct of_device_id ld9040_of_match[] = {
{ .compatible = "samsung,ld9040" },
{ }
};
MODULE_DEVICE_TABLE(of, ld9040_of_match);
static struct spi_driver ld9040_driver = {
- .probe = ld9040_probe,
- .remove = ld9040_remove,
+ .probe = ld9040_probe,
+ .remove = ld9040_remove,
.driver = {
- .name = "ld9040",
- .owner = THIS_MODULE,
+ .name = "ld9040",
+ .owner = THIS_MODULE,
.of_match_table = ld9040_of_match,
},
};
diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c
index 144b273..3005110 100644
--- a/drivers/gpu/drm/panel/panel-s6e8aa0.c
+++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c
@@ -1041,7 +1041,7 @@ static int s6e8aa0_remove(struct mipi_dsi_device *dsi)
return 0;
}
-static struct of_device_id s6e8aa0_of_match[] = {
+static const struct of_device_id s6e8aa0_of_match[] = {
{ .compatible = "samsung,s6e8aa0" },
{ }
};
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 30904a9..f94201b 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -731,6 +731,30 @@ static const struct panel_desc hannstar_hsd070pww1 = {
},
};
+static const struct display_timing hannstar_hsd100pxn1_timing = {
+ .pixelclock = { 55000000, 65000000, 75000000 },
+ .hactive = { 1024, 1024, 1024 },
+ .hfront_porch = { 40, 40, 40 },
+ .hback_porch = { 220, 220, 220 },
+ .hsync_len = { 20, 60, 100 },
+ .vactive = { 768, 768, 768 },
+ .vfront_porch = { 7, 7, 7 },
+ .vback_porch = { 21, 21, 21 },
+ .vsync_len = { 10, 10, 10 },
+ .flags = DISPLAY_FLAGS_DE_HIGH,
+};
+
+static const struct panel_desc hannstar_hsd100pxn1 = {
+ .timings = &hannstar_hsd100pxn1_timing,
+ .num_timings = 1,
+ .bpc = 6,
+ .size = {
+ .width = 203,
+ .height = 152,
+ },
+ .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
+};
+
static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
.clock = 33333,
.hdisplay = 800,
@@ -872,6 +896,30 @@ static const struct panel_desc innolux_zj070na_01p = {
},
};
+static const struct drm_display_mode lg_lb070wv8_mode = {
+ .clock = 33246,
+ .hdisplay = 800,
+ .hsync_start = 800 + 88,
+ .hsync_end = 800 + 88 + 80,
+ .htotal = 800 + 88 + 80 + 88,
+ .vdisplay = 480,
+ .vsync_start = 480 + 10,
+ .vsync_end = 480 + 10 + 25,
+ .vtotal = 480 + 10 + 25 + 10,
+ .vrefresh = 60,
+};
+
+static const struct panel_desc lg_lb070wv8 = {
+ .modes = &lg_lb070wv8_mode,
+ .num_modes = 1,
+ .bpc = 16,
+ .size = {
+ .width = 151,
+ .height = 91,
+ },
+ .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+};
+
static const struct drm_display_mode lg_lp129qe_mode = {
.clock = 285250,
.hdisplay = 2560,
@@ -1038,6 +1086,9 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "hannstar,hsd070pww1",
.data = &hannstar_hsd070pww1,
}, {
+ .compatible = "hannstar,hsd100pxn1",
+ .data = &hannstar_hsd100pxn1,
+ }, {
.compatible = "hit,tx23d38vm0caa",
.data = &hitachi_tx23d38vm0caa
}, {
@@ -1056,6 +1107,9 @@ static const struct of_device_id platform_of_match[] = {
.compatible = "innolux,zj070na-01p",
.data = &innolux_zj070na_01p,
}, {
+ .compatible = "lg,lb070wv8",
+ .data = &lg_lb070wv8,
+ }, {
.compatible = "lg,lp129qe",
.data = &lg_lp129qe,
}, {
diff --git a/include/drm/bridge/ptn3460.h b/include/drm/bridge/ptn3460.h
deleted file mode 100644
index b11f8e1..0000000
--- a/include/drm/bridge/ptn3460.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2013 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef _DRM_BRIDGE_PTN3460_H_
-#define _DRM_BRIDGE_PTN3460_H_
-
-struct drm_device;
-struct drm_bridge;
-struct drm_encoder;
-struct i2c_client;
-struct device_node;
-
-#if defined(CONFIG_DRM_PTN3460) || defined(CONFIG_DRM_PTN3460_MODULE)
-
-int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder,
- struct i2c_client *client, struct device_node *node);
-
-void ptn3460_destroy(struct drm_bridge *bridge);
-
-#else
-
-static inline int ptn3460_init(struct drm_device *dev,
- struct drm_encoder *encoder, struct i2c_client *client,
- struct device_node *node)
-{
- return 0;
-}
-
-static inline void ptn3460_destroy(struct drm_bridge *bridge)
-{
-}
-
-#endif
-
-#endif
OpenPOWER on IntegriCloud