Skip to content

Commit

Permalink
Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/daeinki/drm-exynos into drm-next

Feature summary:
Add S3C64XX SoC series support - S3C64XX SoC series are previous version
chips of Exynos SoC series. With this patch set, KMS driver of Exynos drm
supports those chips also.

Update device tree support - This patch set corrects compatible strings,
and adds Exynos5420 SoC support for hdmi subsystem.

Consider CCF (Common Clock Framework) support - With reference to CCF
support, it uses clock_prepare_enable/clock_disable_unprepare instead of
clk_enable/clk_disable for hdmi subsystem.

Big cleanups - This patch just removes unnecessary all debug logs.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (22 commits)
  ARM: dts: change compatible strings for EXYNOS5250 hdmi subsystem
  drm/exynos: add support for exynos5420 mixer
  drm/exynos: add new compatible strings for hdmi subsystem
  drm/exynos: fix interlace resolutions for exynos5420
  drm/exynos: use of_get_named_gpio to get hdmi hpd gpio
  drm/exynos: make sure to handle an error case to vm_mmap call
  drm/exynos: exynos_drm_ipp: Remove redundant break statement
  drm/exynos: add mout_hdmi clock in hdmi driver to change parent
  drm/exynos: Prepare/Unprepare HDMI subsystem clocks
  drm/exynos: Clean up logs for DRM_ERROR / DRM_DEBUG_KMS
  drm/exynos: Remove tracking log functions
  drm/exynos: hdmi: use drm_display_mode to check the supported modes
  drm/exynos: fimd: Add support for S3C64xx SoCs
  drm/exynos: fimd: Add support for FIMD variants with clock selection
  drm/exynos: fimd: Add support for FIMD versions without SHADOWCON register
  drm/exynos: fimd: Hold pointer to driver data in context struct
  drm/exynos: do not use mode_set_base function directly
  drm/exynos: Remove redundant use of of_match_ptr macro
  drm/exynos: remove ignoring return value warning in hdmi
  drm/exynos: fix WINDOWS_NR checking to vidi driver
  ...
  • Loading branch information
Dave Airlie committed Jul 1, 2013
2 parents d482e5f + 0d1fc82 commit c344ee6
Show file tree
Hide file tree
Showing 32 changed files with 450 additions and 838 deletions.
7 changes: 5 additions & 2 deletions Documentation/devicetree/bindings/video/exynos_hdmi.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Device-Tree bindings for drm hdmi driver

Required properties:
- compatible: value should be "samsung,exynos5-hdmi".
- compatible: value should be one among the following:
1) "samsung,exynos5-hdmi" <DEPRECATED>
2) "samsung,exynos4210-hdmi"
3) "samsung,exynos4212-hdmi"
- reg: physical base address of the hdmi and length of memory mapped
region.
- interrupts: interrupt number to the cpu.
Expand All @@ -15,7 +18,7 @@ Required properties:
Example:

hdmi {
compatible = "samsung,exynos5-hdmi";
compatible = "samsung,exynos4212-hdmi";
reg = <0x14530000 0x100000>;
interrupts = <0 95 0>;
hpd-gpio = <&gpx3 7 0xf 1 3>;
Expand Down
7 changes: 5 additions & 2 deletions Documentation/devicetree/bindings/video/exynos_hdmiddc.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
Device-Tree bindings for hdmiddc driver

Required properties:
- compatible: value should be "samsung,exynos5-hdmiddc".
- compatible: value should be one of the following
1) "samsung,exynos5-hdmiddc" <DEPRECATED>
2) "samsung,exynos4210-hdmiddc"

- reg: I2C address of the hdmiddc device.

Example:

hdmiddc {
compatible = "samsung,exynos5-hdmiddc";
compatible = "samsung,exynos4210-hdmiddc";
reg = <0x50>;
};
7 changes: 5 additions & 2 deletions Documentation/devicetree/bindings/video/exynos_hdmiphy.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
Device-Tree bindings for hdmiphy driver

Required properties:
- compatible: value should be "samsung,exynos5-hdmiphy".
- compatible: value should be one of the following:
1) "samsung,exynos5-hdmiphy" <DEPRECATED>
2) "samsung,exynos4210-hdmiphy".
3) "samsung,exynos4212-hdmiphy".
- reg: I2C address of the hdmiphy device.

Example:

hdmiphy {
compatible = "samsung,exynos5-hdmiphy";
compatible = "samsung,exynos4210-hdmiphy";
reg = <0x38>;
};
9 changes: 7 additions & 2 deletions Documentation/devicetree/bindings/video/exynos_mixer.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
Device-Tree bindings for mixer driver

Required properties:
- compatible: value should be "samsung,exynos5-mixer".
- compatible: value should be one of the following:
1) "samsung,exynos5-mixer" <DEPRECATED>
2) "samsung,exynos4210-mixer"
3) "samsung,exynos5250-mixer"
4) "samsung,exynos5420-mixer"

- reg: physical base address of the mixer and length of memory mapped
region.
- interrupts: interrupt number to the cpu.

Example:

mixer {
compatible = "samsung,exynos5-mixer";
compatible = "samsung,exynos5250-mixer";
reg = <0x14450000 0x10000>;
interrupts = <0 94 0>;
};
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/cros5250-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
samsung,i2c-max-bus-freq = <66000>;

hdmiddc@50 {
compatible = "samsung,exynos5-hdmiddc";
compatible = "samsung,exynos4210-hdmiddc";
reg = <0x50>;
};
};
Expand Down Expand Up @@ -224,7 +224,7 @@
samsung,i2c-max-bus-freq = <378000>;

hdmiphy@38 {
compatible = "samsung,exynos5-hdmiphy";
compatible = "samsung,exynos4212-hdmiphy";
reg = <0x38>;
};
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/exynos5250-smdk5250.dts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
samsung,i2c-max-bus-freq = <66000>;

hdmiddc@50 {
compatible = "samsung,exynos5-hdmiddc";
compatible = "samsung,exynos4210-hdmiddc";
reg = <0x50>;
};
};
Expand Down Expand Up @@ -102,7 +102,7 @@
samsung,i2c-max-bus-freq = <66000>;

hdmiphy@38 {
compatible = "samsung,exynos5-hdmiphy";
compatible = "samsung,exynos4212-hdmiphy";
reg = <0x38>;
};
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/exynos5250.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@
};

hdmi {
compatible = "samsung,exynos5-hdmi";
compatible = "samsung,exynos4212-hdmi";
reg = <0x14530000 0x70000>;
interrupts = <0 95 0>;
clocks = <&clock 333>, <&clock 136>, <&clock 137>,
Expand All @@ -611,7 +611,7 @@
};

mixer {
compatible = "samsung,exynos5-mixer";
compatible = "samsung,exynos5250-mixer";
reg = <0x14450000 0x10000>;
interrupts = <0 94 0>;
};
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/exynos/exynos_ddc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ static struct i2c_device_id ddc_idtable[] = {
static struct of_device_id hdmiddc_match_types[] = {
{
.compatible = "samsung,exynos5-hdmiddc",
}, {
.compatible = "samsung,exynos4210-hdmiddc",
}, {
/* end node */
}
Expand Down
7 changes: 0 additions & 7 deletions drivers/gpu/drm/exynos/exynos_drm_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ static int lowlevel_buffer_allocate(struct drm_device *dev,
enum dma_attr attr;
unsigned int nr_pages;

DRM_DEBUG_KMS("%s\n", __FILE__);

if (buf->dma_addr) {
DRM_DEBUG_KMS("already allocated.\n");
return 0;
Expand Down Expand Up @@ -119,8 +117,6 @@ static int lowlevel_buffer_allocate(struct drm_device *dev,
static void lowlevel_buffer_deallocate(struct drm_device *dev,
unsigned int flags, struct exynos_drm_gem_buf *buf)
{
DRM_DEBUG_KMS("%s.\n", __FILE__);

if (!buf->dma_addr) {
DRM_DEBUG_KMS("dma_addr is invalid.\n");
return;
Expand Down Expand Up @@ -151,7 +147,6 @@ struct exynos_drm_gem_buf *exynos_drm_init_buf(struct drm_device *dev,
{
struct exynos_drm_gem_buf *buffer;

DRM_DEBUG_KMS("%s.\n", __FILE__);
DRM_DEBUG_KMS("desired size = 0x%x\n", size);

buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
Expand All @@ -167,8 +162,6 @@ struct exynos_drm_gem_buf *exynos_drm_init_buf(struct drm_device *dev,
void exynos_drm_fini_buf(struct drm_device *dev,
struct exynos_drm_gem_buf *buffer)
{
DRM_DEBUG_KMS("%s.\n", __FILE__);

if (!buffer) {
DRM_DEBUG_KMS("buffer is null.\n");
return;
Expand Down
51 changes: 2 additions & 49 deletions drivers/gpu/drm/exynos/exynos_drm_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ convert_to_display_mode(struct drm_display_mode *mode,
struct exynos_drm_panel_info *panel)
{
struct fb_videomode *timing = &panel->timing;
DRM_DEBUG_KMS("%s\n", __FILE__);

mode->clock = timing->pixclock / 1000;
mode->vrefresh = timing->refresh;
Expand All @@ -58,37 +57,6 @@ convert_to_display_mode(struct drm_display_mode *mode,
mode->flags |= DRM_MODE_FLAG_DBLSCAN;
}

/* convert drm_display_mode to exynos_video_timings */
static inline void
convert_to_video_timing(struct fb_videomode *timing,
struct drm_display_mode *mode)
{
DRM_DEBUG_KMS("%s\n", __FILE__);

memset(timing, 0, sizeof(*timing));

timing->pixclock = mode->clock * 1000;
timing->refresh = drm_mode_vrefresh(mode);

timing->xres = mode->hdisplay;
timing->right_margin = mode->hsync_start - mode->hdisplay;
timing->hsync_len = mode->hsync_end - mode->hsync_start;
timing->left_margin = mode->htotal - mode->hsync_end;

timing->yres = mode->vdisplay;
timing->lower_margin = mode->vsync_start - mode->vdisplay;
timing->vsync_len = mode->vsync_end - mode->vsync_start;
timing->upper_margin = mode->vtotal - mode->vsync_end;

if (mode->flags & DRM_MODE_FLAG_INTERLACE)
timing->vmode = FB_VMODE_INTERLACED;
else
timing->vmode = FB_VMODE_NONINTERLACED;

if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
timing->vmode |= FB_VMODE_DOUBLE;
}

static int exynos_drm_connector_get_modes(struct drm_connector *connector)
{
struct exynos_drm_connector *exynos_connector =
Expand All @@ -99,8 +67,6 @@ static int exynos_drm_connector_get_modes(struct drm_connector *connector)
unsigned int count = 0;
int ret;

DRM_DEBUG_KMS("%s\n", __FILE__);

if (!display_ops) {
DRM_DEBUG_KMS("display_ops is null.\n");
return 0;
Expand Down Expand Up @@ -168,15 +134,12 @@ static int exynos_drm_connector_mode_valid(struct drm_connector *connector,
to_exynos_connector(connector);
struct exynos_drm_manager *manager = exynos_connector->manager;
struct exynos_drm_display_ops *display_ops = manager->display_ops;
struct fb_videomode timing;
int ret = MODE_BAD;

DRM_DEBUG_KMS("%s\n", __FILE__);

convert_to_video_timing(&timing, mode);

if (display_ops && display_ops->check_timing)
if (!display_ops->check_timing(manager->dev, (void *)&timing))
if (display_ops && display_ops->check_mode)
if (!display_ops->check_mode(manager->dev, mode))
ret = MODE_OK;

return ret;
Expand All @@ -190,8 +153,6 @@ struct drm_encoder *exynos_drm_best_encoder(struct drm_connector *connector)
struct drm_mode_object *obj;
struct drm_encoder *encoder;

DRM_DEBUG_KMS("%s\n", __FILE__);

obj = drm_mode_object_find(dev, exynos_connector->encoder_id,
DRM_MODE_OBJECT_ENCODER);
if (!obj) {
Expand Down Expand Up @@ -234,8 +195,6 @@ void exynos_drm_display_power(struct drm_connector *connector, int mode)
static void exynos_drm_connector_dpms(struct drm_connector *connector,
int mode)
{
DRM_DEBUG_KMS("%s\n", __FILE__);

/*
* in case that drm_crtc_helper_set_mode() is called,
* encoder/crtc->funcs->dpms() will be just returned
Expand Down Expand Up @@ -282,8 +241,6 @@ exynos_drm_connector_detect(struct drm_connector *connector, bool force)
manager->display_ops;
enum drm_connector_status status = connector_status_disconnected;

DRM_DEBUG_KMS("%s\n", __FILE__);

if (display_ops && display_ops->is_connected) {
if (display_ops->is_connected(manager->dev))
status = connector_status_connected;
Expand All @@ -299,8 +256,6 @@ static void exynos_drm_connector_destroy(struct drm_connector *connector)
struct exynos_drm_connector *exynos_connector =
to_exynos_connector(connector);

DRM_DEBUG_KMS("%s\n", __FILE__);

drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
kfree(exynos_connector);
Expand All @@ -322,8 +277,6 @@ struct drm_connector *exynos_drm_connector_create(struct drm_device *dev,
int type;
int err;

DRM_DEBUG_KMS("%s\n", __FILE__);

exynos_connector = kzalloc(sizeof(*exynos_connector), GFP_KERNEL);
if (!exynos_connector) {
DRM_ERROR("failed to allocate connector\n");
Expand Down
12 changes: 0 additions & 12 deletions drivers/gpu/drm/exynos/exynos_drm_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ static int exynos_drm_create_enc_conn(struct drm_device *dev,
struct drm_connector *connector;
int ret;

DRM_DEBUG_DRIVER("%s\n", __FILE__);

subdrv->manager->dev = subdrv->dev;

/* create and initialize a encoder for this sub driver. */
Expand Down Expand Up @@ -102,8 +100,6 @@ static int exynos_drm_subdrv_probe(struct drm_device *dev,
static void exynos_drm_subdrv_remove(struct drm_device *dev,
struct exynos_drm_subdrv *subdrv)
{
DRM_DEBUG_DRIVER("%s\n", __FILE__);

if (subdrv->remove)
subdrv->remove(dev, subdrv->dev);
}
Expand All @@ -114,8 +110,6 @@ int exynos_drm_device_register(struct drm_device *dev)
unsigned int fine_cnt = 0;
int err;

DRM_DEBUG_DRIVER("%s\n", __FILE__);

if (!dev)
return -EINVAL;

Expand Down Expand Up @@ -158,8 +152,6 @@ int exynos_drm_device_unregister(struct drm_device *dev)
{
struct exynos_drm_subdrv *subdrv;

DRM_DEBUG_DRIVER("%s\n", __FILE__);

if (!dev) {
WARN(1, "Unexpected drm device unregister!\n");
return -EINVAL;
Expand All @@ -176,8 +168,6 @@ EXPORT_SYMBOL_GPL(exynos_drm_device_unregister);

int exynos_drm_subdrv_register(struct exynos_drm_subdrv *subdrv)
{
DRM_DEBUG_DRIVER("%s\n", __FILE__);

if (!subdrv)
return -EINVAL;

Expand All @@ -189,8 +179,6 @@ EXPORT_SYMBOL_GPL(exynos_drm_subdrv_register);

int exynos_drm_subdrv_unregister(struct exynos_drm_subdrv *subdrv)
{
DRM_DEBUG_DRIVER("%s\n", __FILE__);

if (!subdrv)
return -EINVAL;

Expand Down
Loading

0 comments on commit c344ee6

Please sign in to comment.