Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86a7e122 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'exynos-drm-next' of...

Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

   Summary:
   - Consider fallback option to gem allocation fail
     . try to allocate physically non-contiguous memory
       if iommu is supported when physically contiguous memory allocation
       failed.
   - Add runtime pm support to g2d driver
   - Add device tree support
     . add device tree support to rotator driver, make fimd driver get
       signal polarities from device tree.
   - some fixups
     . correct pixel format setting to fimd driver, and consider pixel
       format checking to a particular window layer.
   - some cleanups
     . replace fb_videomode with videomode.
     . remove non-DT support

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (21 commits)
  drm/exynos: Fix build error with exynos_drm_connector.c
  drm/exynos: Remove non-DT support in exynos_drm_fimd
  drm/exynos: Remove non-DT support in exynos_hdmi
  drm/exynos: Remove non-DT support in exynos_drm_g2d
  drm/exynos: Remove non-DT support in exynos_hdmiphy
  drm/exynos: Remove non-DT support in exynos_ddc
  drm/exynos: Make Exynos DRM drivers depend on OF
  drm/exynos: Consider fallback option to allocation fail
  drm/exynos: fimd: move platform data parsing to separate function
  drm/exynos: fimd: get signal polarities from device tree
  drm/exynos: fimd: replace struct fb_videomode with videomode
  drm/exynos: check a pixel format to a particular window layer
  drm/exynos: fix fimd pixel format setting
  drm/exynos: Add NULL pointer check
  drm/exynos: Remove redundant error messages
  drm/exynos: Add missing of.h header include
  drm/exynos: Remove redundant NULL check in exynos_drm_buf
  drm/exynos: add device tree support for rotator
  drm/exynos: Add missing includes
  drm/exynos: add runtime pm interfaces to g2d driver
  ...
parents 3b28802e 6914262a
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
* Samsung Image Rotator

Required properties:
  - compatible : value should be one of the following:
	(a) "samsung,exynos4210-rotator" for Rotator IP in Exynos4210
	(b) "samsung,exynos4212-rotator" for Rotator IP in Exynos4212/4412
	(c) "samsung,exynos5250-rotator" for Rotator IP in Exynos5250

  - reg : Physical base address of the IP registers and length of memory
	  mapped region.

  - interrupts : Interrupt specifier for rotator interrupt, according to format
		 specific to interrupt parent.

  - clocks : Clock specifier for rotator clock, according to generic clock
	     bindings. (See Documentation/devicetree/bindings/clock/exynos*.txt)

  - clock-names : Names of clocks. For exynos rotator, it should be "rotator".

Example:
	rotator@12810000 {
		compatible = "samsung,exynos4210-rotator";
		reg = <0x12810000 0x1000>;
		interrupts = <0 83 0>;
		clocks = <&clock 278>;
		clock-names = "rotator";
	};
+3 −3
Original line number Diff line number Diff line
config DRM_EXYNOS
	tristate "DRM Support for Samsung SoC EXYNOS Series"
	depends on DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM)
	depends on OF && DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM)
	select DRM_KMS_HELPER
	select FB_CFB_FILLRECT
	select FB_CFB_COPYAREA
	select FB_CFB_IMAGEBLIT
	select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE
	select VIDEOMODE_HELPERS
	help
	  Choose this option if you have a Samsung SoC EXYNOS chipset.
	  If M is selected the module will be called exynosdrm.
@@ -24,9 +25,8 @@ config DRM_EXYNOS_DMABUF

config DRM_EXYNOS_FIMD
	bool "Exynos DRM FIMD"
	depends on OF && DRM_EXYNOS && !FB_S3C && !ARCH_MULTIPLATFORM
	depends on DRM_EXYNOS && !FB_S3C && !ARCH_MULTIPLATFORM
	select FB_MODE_HELPERS
	select VIDEOMODE_HELPERS
	help
	  Choose this option if you want to use Exynos FIMD for DRM.

+2 −11
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@

#include <linux/kernel.h>
#include <linux/i2c.h>

#include <linux/of.h>

#include "exynos_drm_drv.h"
#include "exynos_hdmi.h"
@@ -41,13 +41,6 @@ static int s5p_ddc_remove(struct i2c_client *client)
	return 0;
}

static struct i2c_device_id ddc_idtable[] = {
	{"s5p_ddc", 0},
	{"exynos5-hdmiddc", 0},
	{ },
};

#ifdef CONFIG_OF
static struct of_device_id hdmiddc_match_types[] = {
	{
		.compatible = "samsung,exynos5-hdmiddc",
@@ -57,15 +50,13 @@ static struct of_device_id hdmiddc_match_types[] = {
		/* end node */
	}
};
#endif

struct i2c_driver ddc_driver = {
	.driver = {
		.name = "exynos-hdmiddc",
		.owner = THIS_MODULE,
		.of_match_table = of_match_ptr(hdmiddc_match_types),
		.of_match_table = hdmiddc_match_types,
	},
	.id_table	= ddc_idtable,
	.probe		= s5p_ddc_probe,
	.remove		= s5p_ddc_remove,
	.command		= NULL,
+1 −8
Original line number Diff line number Diff line
@@ -149,10 +149,8 @@ struct exynos_drm_gem_buf *exynos_drm_init_buf(struct drm_device *dev,
	DRM_DEBUG_KMS("desired size = 0x%x\n", size);

	buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
	if (!buffer) {
		DRM_ERROR("failed to allocate exynos_drm_gem_buf.\n");
	if (!buffer)
		return NULL;
	}

	buffer->size = size;
	return buffer;
@@ -161,11 +159,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)
{
	if (!buffer) {
		DRM_DEBUG_KMS("buffer is null.\n");
		return;
	}

	kfree(buffer);
	buffer = NULL;
}
+5 −33
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <drm/exynos_drm.h>
#include "exynos_drm_drv.h"
#include "exynos_drm_encoder.h"
#include "exynos_drm_connector.h"

#define to_exynos_connector(x)	container_of(x, struct exynos_drm_connector,\
				drm_connector)
@@ -28,35 +29,6 @@ struct exynos_drm_connector {
	uint32_t		dpms;
};

/* convert exynos_video_timings to drm_display_mode */
static inline void
convert_to_display_mode(struct drm_display_mode *mode,
			struct exynos_drm_panel_info *panel)
{
	struct fb_videomode *timing = &panel->timing;

	mode->clock = timing->pixclock / 1000;
	mode->vrefresh = timing->refresh;

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

	mode->vdisplay = timing->yres;
	mode->vsync_start = mode->vdisplay + timing->lower_margin;
	mode->vsync_end = mode->vsync_start + timing->vsync_len;
	mode->vtotal = mode->vsync_end + timing->upper_margin;
	mode->width_mm = panel->width_mm;
	mode->height_mm = panel->height_mm;

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

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

static int exynos_drm_connector_get_modes(struct drm_connector *connector)
{
	struct exynos_drm_connector *exynos_connector =
@@ -111,7 +83,9 @@ static int exynos_drm_connector_get_modes(struct drm_connector *connector)
			return 0;
		}

		convert_to_display_mode(mode, panel);
		drm_display_mode_from_videomode(&panel->vm, mode);
		mode->width_mm = panel->width_mm;
		mode->height_mm = panel->height_mm;
		connector->display_info.width_mm = mode->width_mm;
		connector->display_info.height_mm = mode->height_mm;

@@ -278,10 +252,8 @@ struct drm_connector *exynos_drm_connector_create(struct drm_device *dev,
	int err;

	exynos_connector = kzalloc(sizeof(*exynos_connector), GFP_KERNEL);
	if (!exynos_connector) {
		DRM_ERROR("failed to allocate connector\n");
	if (!exynos_connector)
		return NULL;
	}

	connector = &exynos_connector->drm_connector;

Loading