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

Commit f7c125a1 authored by Dave Airlie's avatar Dave Airlie
Browse files

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

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

Summary:
- Use generic function to get buffer count instead of specific one.
  In case of Exynos DRM, There was a special case which decides pixel
  format of a given buffer according to planer types, which is NV12M and NV12.
  However, NV12M doesn't exist in drm fourcc so it removes
  exynos_drm_format_num_buffers() specific to Exynos DRM and use a generic function,
  drm_format_num_planes() instead.
- Allow mixer driver to support NV21 format for Video processor.
  This format was already supported but we just missed DRM_FORMAT_NV21 case
  so this patch considers the case so that Mixer driver can handle it correctly.
- Add regression fix and some code cleanups.

* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos: dp: Lower level of EDID read success message
  drm/exynos: cleanup exynos_drm_plane
  drm/exynos: 'win' is always unsigned
  drm/exynos: mixer: don't dump registers under spinlock
  drm/exynos: Consolidate return statements in fimd_bind()
  drm/exynos: Constify exynos_drm_crtc_ops
  drm/exynos: Fix build breakage on !DRM_EXYNOS_FIMD
  drm/exynos: mixer: Constify platform_device_id
  drm/exynos: mixer: cleanup pixelformat handling
  drm/exynos: mixer: also allow NV21 for the video processor
  drm/exynos: mixer: remove buffer count handling in vp_video_buffer()
  drm/exynos: plane: honor buffer offset for dma_addr
  drm/exynos: fb: use drm_format_num_planes to get buffer count
parents 64d237e6 b0f155ad
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ static void decon_wait_for_vblank(struct exynos_drm_crtc *crtc)

static void decon_clear_channel(struct decon_context *ctx)
{
	int win, ch_enabled = 0;
	unsigned int win, ch_enabled = 0;

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

@@ -710,7 +710,7 @@ static void decon_dpms(struct exynos_drm_crtc *crtc, int mode)
	}
}

static struct exynos_drm_crtc_ops decon_crtc_ops = {
static const struct exynos_drm_crtc_ops decon_crtc_ops = {
	.dpms = decon_dpms,
	.mode_fixup = decon_mode_fixup,
	.commit = decon_commit,
+9 −4
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@
#include <drm/bridge/ptn3460.h>

#include "exynos_dp_core.h"
#include "exynos_drm_fimd.h"

#define ctx_from_connector(c)	container_of(c, struct exynos_dp_device, \
					connector)
@@ -196,7 +195,7 @@ static int exynos_dp_read_edid(struct exynos_dp_device *dp)
		}
	}

	dev_err(dp->dev, "EDID Read success!\n");
	dev_dbg(dp->dev, "EDID Read success!\n");
	return 0;
}

@@ -1066,6 +1065,8 @@ static void exynos_dp_phy_exit(struct exynos_dp_device *dp)

static void exynos_dp_poweron(struct exynos_dp_device *dp)
{
	struct exynos_drm_crtc *crtc = dp_to_crtc(dp);

	if (dp->dpms_mode == DRM_MODE_DPMS_ON)
		return;

@@ -1076,7 +1077,8 @@ static void exynos_dp_poweron(struct exynos_dp_device *dp)
		}
	}

	fimd_dp_clock_enable(dp_to_crtc(dp), true);
	if (crtc->ops->clock_enable)
		crtc->ops->clock_enable(dp_to_crtc(dp), true);

	clk_prepare_enable(dp->clock);
	exynos_dp_phy_init(dp);
@@ -1087,6 +1089,8 @@ static void exynos_dp_poweron(struct exynos_dp_device *dp)

static void exynos_dp_poweroff(struct exynos_dp_device *dp)
{
	struct exynos_drm_crtc *crtc = dp_to_crtc(dp);

	if (dp->dpms_mode != DRM_MODE_DPMS_ON)
		return;

@@ -1102,7 +1106,8 @@ static void exynos_dp_poweroff(struct exynos_dp_device *dp)
	exynos_dp_phy_exit(dp);
	clk_disable_unprepare(dp->clock);

	fimd_dp_clock_enable(dp_to_crtc(dp), false);
	if (crtc->ops->clock_enable)
		crtc->ops->clock_enable(dp_to_crtc(dp), false);

	if (dp->panel) {
		if (drm_panel_unprepare(dp->panel))
+5 −5
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
					struct drm_plane *plane,
					int pipe,
					enum exynos_drm_output_type type,
					       struct exynos_drm_crtc_ops *ops,
					const struct exynos_drm_crtc_ops *ops,
					void *ctx)
{
	struct exynos_drm_crtc *exynos_crtc;
+5 −5
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
					struct drm_plane *plane,
					int pipe,
					enum exynos_drm_output_type type,
					       struct exynos_drm_crtc_ops *ops,
					const struct exynos_drm_crtc_ops *ops,
					void *context);
int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe);
void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int pipe);
+6 −14
Original line number Diff line number Diff line
@@ -71,13 +71,6 @@ enum exynos_drm_output_type {
 * @dma_addr: array of bus(accessed by dma) address to the memory region
 *	      allocated for a overlay.
 * @zpos: order of overlay layer(z position).
 * @index_color: if using color key feature then this value would be used
 *			as index color.
 * @default_win: a window to be enabled.
 * @color_key: color key on or off.
 * @local_path: in case of lcd type, local path mode on or off.
 * @transparency: transparency on or off.
 * @activated: activated or not.
 * @enabled: enabled or not.
 * @resume: to resume or not.
 *
@@ -108,13 +101,7 @@ struct exynos_drm_plane {
	uint32_t pixel_format;
	dma_addr_t dma_addr[MAX_FB_BUFFER];
	unsigned int zpos;
	unsigned int index_color;

	bool default_win:1;
	bool color_key:1;
	bool local_path:1;
	bool transparency:1;
	bool activated:1;
	bool enabled:1;
	bool resume:1;
};
@@ -181,6 +168,10 @@ struct exynos_drm_display {
 * @win_disable: disable hardware specific overlay.
 * @te_handler: trigger to transfer video image at the tearing effect
 *	synchronization signal if there is a page flip request.
 * @clock_enable: optional function enabling/disabling display domain clock,
 *	called from exynos-dp driver before powering up (with
 *	'enable' argument as true) and after powering down (with
 *	'enable' as false).
 */
struct exynos_drm_crtc;
struct exynos_drm_crtc_ops {
@@ -195,6 +186,7 @@ struct exynos_drm_crtc_ops {
	void (*win_commit)(struct exynos_drm_crtc *crtc, unsigned int zpos);
	void (*win_disable)(struct exynos_drm_crtc *crtc, unsigned int zpos);
	void (*te_handler)(struct exynos_drm_crtc *crtc);
	void (*clock_enable)(struct exynos_drm_crtc *crtc, bool enable);
};

/*
@@ -221,7 +213,7 @@ struct exynos_drm_crtc {
	unsigned int			dpms;
	wait_queue_head_t		pending_flip_queue;
	struct drm_pending_vblank_event	*event;
	struct exynos_drm_crtc_ops	*ops;
	const struct exynos_drm_crtc_ops	*ops;
	void				*ctx;
};

Loading