Commit b4590047 authored by Dave Airlie's avatar Dave Airlie

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

   This pull request includes comprehensive cleanups to HDMI part and
   several fixups. In addition, this pull request includes also a defconfig
   patch which enables mixer driver as default. For this, I got already
   Acked-by from Krzysztof Kozlowski who is a Exynos SoC maintainer.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (34 commits)
  drm/exynos/gem: remove DMA-mapping hacks used for constructing page array
  ARM: exynos_defconfig: enable Exynos DRM Mixer driver
  drm/exynos: simplify Kconfig component names
  drm/exynos: re-arrange Kconfig entries
  drm/exynos: abstract out common dependency
  drm/exynos: separate Mixer and HDMI drivers
  drm/exynos/mixer: replace direct cross-driver call with drm mode validation
  drm/exynos: add atomic_check callback to exynos_crtc
  drm/exynos/decon5433: add support for DECON-TV
  drm/exynos/decon5433: remove duplicated initialization
  drm/exynos/decon5433: merge different flag fields
  drm/exynos/decon5433: add function to set particular register bits
  drm/exynos/decon5433: fix timing registers writes
  drm/exynos/decon5433: add PCLK clock
  drm/exynos: cleanup name of gem object for exynos_drm
  drm/exynos: fix to detach device of iommu
  drm/exynos: add cursor plane support
  drm/exynos: add global macro for the default primary plane
  drm/exynos: fix spelling errors
  drm: exynos: mixer: fix using usleep() in atomic context
  ...
parents c0f3f90c df547bf7
...@@ -132,6 +132,7 @@ CONFIG_DRM_PARADE_PS8622=y ...@@ -132,6 +132,7 @@ CONFIG_DRM_PARADE_PS8622=y
CONFIG_DRM_EXYNOS=y CONFIG_DRM_EXYNOS=y
CONFIG_DRM_EXYNOS_FIMD=y CONFIG_DRM_EXYNOS_FIMD=y
CONFIG_DRM_EXYNOS_DSI=y CONFIG_DRM_EXYNOS_DSI=y
CONFIG_DRM_EXYNOS_MIXER=y
CONFIG_DRM_EXYNOS_HDMI=y CONFIG_DRM_EXYNOS_HDMI=y
CONFIG_DRM_PANEL_SIMPLE=y CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=y CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=y
......
...@@ -11,43 +11,59 @@ config DRM_EXYNOS ...@@ -11,43 +11,59 @@ config DRM_EXYNOS
Choose this option if you have a Samsung SoC EXYNOS chipset. Choose this option if you have a Samsung SoC EXYNOS chipset.
If M is selected the module will be called exynosdrm. If M is selected the module will be called exynosdrm.
if DRM_EXYNOS
config DRM_EXYNOS_IOMMU config DRM_EXYNOS_IOMMU
bool bool
depends on DRM_EXYNOS && EXYNOS_IOMMU && ARM_DMA_USE_IOMMU depends on EXYNOS_IOMMU && ARM_DMA_USE_IOMMU
default y default y
comment "CRTCs"
config DRM_EXYNOS_FIMD config DRM_EXYNOS_FIMD
bool "Exynos DRM FIMD" bool "FIMD"
depends on DRM_EXYNOS && !FB_S3C depends on !FB_S3C
select FB_MODE_HELPERS select FB_MODE_HELPERS
select MFD_SYSCON select MFD_SYSCON
help help
Choose this option if you want to use Exynos FIMD for DRM. Choose this option if you want to use Exynos FIMD for DRM.
config DRM_EXYNOS5433_DECON config DRM_EXYNOS5433_DECON
bool "Exynos5433 DRM DECON" bool "DECON on Exynos5433"
depends on DRM_EXYNOS
help help
Choose this option if you want to use Exynos5433 DECON for DRM. Choose this option if you want to use Exynos5433 DECON for DRM.
config DRM_EXYNOS7_DECON config DRM_EXYNOS7_DECON
bool "Exynos7 DRM DECON" bool "DECON on Exynos7"
depends on DRM_EXYNOS && !FB_S3C depends on !FB_S3C
select FB_MODE_HELPERS select FB_MODE_HELPERS
help help
Choose this option if you want to use Exynos DECON for DRM. Choose this option if you want to use Exynos DECON for DRM.
config DRM_EXYNOS_MIXER
bool "Mixer"
depends on !VIDEO_SAMSUNG_S5P_TV
help
Choose this option if you want to use Exynos Mixer for DRM.
config DRM_EXYNOS_VIDI
bool "Virtual Display"
help
Choose this option if you want to use Exynos VIDI for DRM.
comment "Encoders and Bridges"
config DRM_EXYNOS_DPI config DRM_EXYNOS_DPI
bool "EXYNOS DRM parallel output support" bool "Parallel output"
depends on DRM_EXYNOS && (DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON) depends on DRM_EXYNOS_FIMD
select DRM_PANEL select DRM_PANEL
default n default n
help help
This enables support for Exynos parallel output. This enables support for Exynos parallel output.
config DRM_EXYNOS_DSI config DRM_EXYNOS_DSI
bool "EXYNOS DRM MIPI-DSI driver support" bool "MIPI-DSI host"
depends on DRM_EXYNOS && (DRM_EXYNOS_FIMD || DRM_EXYNOS5433_DECON || DRM_EXYNOS7_DECON) depends on DRM_EXYNOS_FIMD || DRM_EXYNOS5433_DECON || DRM_EXYNOS7_DECON
select DRM_MIPI_DSI select DRM_MIPI_DSI
select DRM_PANEL select DRM_PANEL
default n default n
...@@ -55,58 +71,55 @@ config DRM_EXYNOS_DSI ...@@ -55,58 +71,55 @@ config DRM_EXYNOS_DSI
This enables support for Exynos MIPI-DSI device. This enables support for Exynos MIPI-DSI device.
config DRM_EXYNOS_DP config DRM_EXYNOS_DP
bool "EXYNOS DRM DP driver support" bool "Display Port"
depends on DRM_EXYNOS && (DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON) depends on DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON
default DRM_EXYNOS default DRM_EXYNOS
select DRM_PANEL select DRM_PANEL
help help
This enables support for DP device. This enables support for DP device.
config DRM_EXYNOS_HDMI config DRM_EXYNOS_HDMI
bool "Exynos DRM HDMI" bool "HDMI"
depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_TV depends on !VIDEO_SAMSUNG_S5P_TV && (DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON)
help help
Choose this option if you want to use Exynos HDMI for DRM. Choose this option if you want to use Exynos HDMI for DRM.
config DRM_EXYNOS_VIDI config DRM_EXYNOS_MIC
bool "Exynos DRM Virtual Display" bool "Mobile Image Compressor"
depends on DRM_EXYNOS depends on DRM_EXYNOS5433_DECON
help help
Choose this option if you want to use Exynos VIDI for DRM. Choose this option if you want to use Exynos MIC for DRM.
comment "Sub-drivers"
config DRM_EXYNOS_G2D config DRM_EXYNOS_G2D
bool "Exynos DRM G2D" bool "G2D"
depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_G2D depends on !VIDEO_SAMSUNG_S5P_G2D
select FRAME_VECTOR select FRAME_VECTOR
help help
Choose this option if you want to use Exynos G2D for DRM. Choose this option if you want to use Exynos G2D for DRM.
config DRM_EXYNOS_IPP config DRM_EXYNOS_IPP
bool "Exynos DRM IPP" bool "Image Post Processor"
depends on DRM_EXYNOS
help help
Choose this option if you want to use IPP feature for DRM. Choose this option if you want to use IPP feature for DRM.
config DRM_EXYNOS_FIMC config DRM_EXYNOS_FIMC
bool "Exynos DRM FIMC" bool "FIMC"
depends on DRM_EXYNOS_IPP && MFD_SYSCON depends on DRM_EXYNOS_IPP && MFD_SYSCON
help help
Choose this option if you want to use Exynos FIMC for DRM. Choose this option if you want to use Exynos FIMC for DRM.
config DRM_EXYNOS_ROTATOR config DRM_EXYNOS_ROTATOR
bool "Exynos DRM Rotator" bool "Rotator"
depends on DRM_EXYNOS_IPP depends on DRM_EXYNOS_IPP
help help
Choose this option if you want to use Exynos Rotator for DRM. Choose this option if you want to use Exynos Rotator for DRM.
config DRM_EXYNOS_GSC config DRM_EXYNOS_GSC
bool "Exynos DRM GSC" bool "GScaler"
depends on DRM_EXYNOS_IPP && ARCH_EXYNOS5 && !ARCH_MULTIPLATFORM depends on DRM_EXYNOS_IPP && ARCH_EXYNOS5 && !ARCH_MULTIPLATFORM
help help
Choose this option if you want to use Exynos GSC for DRM. Choose this option if you want to use Exynos GSC for DRM.
config DRM_EXYNOS_MIC endif
bool "Exynos DRM MIC"
depends on (DRM_EXYNOS && DRM_EXYNOS5433_DECON)
help
Choose this option if you want to use Exynos MIC for DRM.
...@@ -14,7 +14,8 @@ exynosdrm-$(CONFIG_DRM_EXYNOS7_DECON) += exynos7_drm_decon.o ...@@ -14,7 +14,8 @@ exynosdrm-$(CONFIG_DRM_EXYNOS7_DECON) += exynos7_drm_decon.o
exynosdrm-$(CONFIG_DRM_EXYNOS_DPI) += exynos_drm_dpi.o exynosdrm-$(CONFIG_DRM_EXYNOS_DPI) += exynos_drm_dpi.o
exynosdrm-$(CONFIG_DRM_EXYNOS_DSI) += exynos_drm_dsi.o exynosdrm-$(CONFIG_DRM_EXYNOS_DSI) += exynos_drm_dsi.o
exynosdrm-$(CONFIG_DRM_EXYNOS_DP) += exynos_dp_core.o exynos_dp_reg.o exynosdrm-$(CONFIG_DRM_EXYNOS_DP) += exynos_dp_core.o exynos_dp_reg.o
exynosdrm-$(CONFIG_DRM_EXYNOS_HDMI) += exynos_hdmi.o exynos_mixer.o exynosdrm-$(CONFIG_DRM_EXYNOS_MIXER) += exynos_mixer.o
exynosdrm-$(CONFIG_DRM_EXYNOS_HDMI) += exynos_hdmi.o
exynosdrm-$(CONFIG_DRM_EXYNOS_VIDI) += exynos_drm_vidi.o exynosdrm-$(CONFIG_DRM_EXYNOS_VIDI) += exynos_drm_vidi.o
exynosdrm-$(CONFIG_DRM_EXYNOS_G2D) += exynos_drm_g2d.o exynosdrm-$(CONFIG_DRM_EXYNOS_G2D) += exynos_drm_g2d.o
exynosdrm-$(CONFIG_DRM_EXYNOS_IPP) += exynos_drm_ipp.o exynosdrm-$(CONFIG_DRM_EXYNOS_IPP) += exynos_drm_ipp.o
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#define MIN_FB_WIDTH_FOR_16WORD_BURST 128 #define MIN_FB_WIDTH_FOR_16WORD_BURST 128
#define WINDOWS_NR 2 #define WINDOWS_NR 2
#define CURSOR_WIN 1
struct decon_context { struct decon_context {
struct device *dev; struct device *dev;
...@@ -51,7 +52,6 @@ struct decon_context { ...@@ -51,7 +52,6 @@ struct decon_context {
struct clk *eclk; struct clk *eclk;
struct clk *vclk; struct clk *vclk;
void __iomem *regs; void __iomem *regs;
unsigned int default_win;
unsigned long irq_flags; unsigned long irq_flags;
bool i80_if; bool i80_if;
bool suspended; bool suspended;
...@@ -690,8 +690,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data) ...@@ -690,8 +690,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
} }
for (zpos = 0; zpos < WINDOWS_NR; zpos++) { for (zpos = 0; zpos < WINDOWS_NR; zpos++) {
type = (zpos == ctx->default_win) ? DRM_PLANE_TYPE_PRIMARY : type = exynos_plane_get_type(zpos, CURSOR_WIN);
DRM_PLANE_TYPE_OVERLAY;
ret = exynos_plane_init(drm_dev, &ctx->planes[zpos], ret = exynos_plane_init(drm_dev, &ctx->planes[zpos],
1 << ctx->pipe, type, decon_formats, 1 << ctx->pipe, type, decon_formats,
ARRAY_SIZE(decon_formats), zpos); ARRAY_SIZE(decon_formats), zpos);
...@@ -699,7 +698,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data) ...@@ -699,7 +698,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
return ret; return ret;
} }
exynos_plane = &ctx->planes[ctx->default_win]; exynos_plane = &ctx->planes[DEFAULT_WIN];
ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD, ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD,
&decon_crtc_ops, ctx); &decon_crtc_ops, ctx);
......
...@@ -50,6 +50,17 @@ exynos_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) ...@@ -50,6 +50,17 @@ exynos_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
exynos_crtc->ops->commit(exynos_crtc); exynos_crtc->ops->commit(exynos_crtc);
} }
static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
if (exynos_crtc->ops->atomic_check)
return exynos_crtc->ops->atomic_check(exynos_crtc, state);
return 0;
}
static void exynos_crtc_atomic_begin(struct drm_crtc *crtc, static void exynos_crtc_atomic_begin(struct drm_crtc *crtc,
struct drm_crtc_state *old_crtc_state) struct drm_crtc_state *old_crtc_state)
{ {
...@@ -86,6 +97,7 @@ static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = { ...@@ -86,6 +97,7 @@ static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
.enable = exynos_drm_crtc_enable, .enable = exynos_drm_crtc_enable,
.disable = exynos_drm_crtc_disable, .disable = exynos_drm_crtc_disable,
.mode_set_nofb = exynos_drm_crtc_mode_set_nofb, .mode_set_nofb = exynos_drm_crtc_mode_set_nofb,
.atomic_check = exynos_crtc_atomic_check,
.atomic_begin = exynos_crtc_atomic_begin, .atomic_begin = exynos_crtc_atomic_begin,
.atomic_flush = exynos_crtc_atomic_flush, .atomic_flush = exynos_crtc_atomic_flush,
}; };
......
...@@ -529,8 +529,10 @@ static struct platform_driver *const exynos_drm_kms_drivers[] = { ...@@ -529,8 +529,10 @@ static struct platform_driver *const exynos_drm_kms_drivers[] = {
#ifdef CONFIG_DRM_EXYNOS_DSI #ifdef CONFIG_DRM_EXYNOS_DSI
&dsi_driver, &dsi_driver,
#endif #endif
#ifdef CONFIG_DRM_EXYNOS_HDMI #ifdef CONFIG_DRM_EXYNOS_MIXER
&mixer_driver, &mixer_driver,
#endif
#ifdef CONFIG_DRM_EXYNOS_HDMI
&hdmi_driver, &hdmi_driver,
#endif #endif
#ifdef CONFIG_DRM_EXYNOS_VIDI #ifdef CONFIG_DRM_EXYNOS_VIDI
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#define MAX_PLANE 5 #define MAX_PLANE 5
#define MAX_FB_BUFFER 4 #define MAX_FB_BUFFER 4
#define DEFAULT_WIN 0
#define to_exynos_crtc(x) container_of(x, struct exynos_drm_crtc, base) #define to_exynos_crtc(x) container_of(x, struct exynos_drm_crtc, base)
#define to_exynos_plane(x) container_of(x, struct exynos_drm_plane, base) #define to_exynos_plane(x) container_of(x, struct exynos_drm_plane, base)
...@@ -87,6 +89,7 @@ struct exynos_drm_plane { ...@@ -87,6 +89,7 @@ struct exynos_drm_plane {
* @disable_vblank: specific driver callback for disabling vblank interrupt. * @disable_vblank: specific driver callback for disabling vblank interrupt.
* @wait_for_vblank: wait for vblank interrupt to make sure that * @wait_for_vblank: wait for vblank interrupt to make sure that
* hardware overlay is updated. * hardware overlay is updated.
* @atomic_check: validate state
* @atomic_begin: prepare a window to receive a update * @atomic_begin: prepare a window to receive a update
* @atomic_flush: mark the end of a window update * @atomic_flush: mark the end of a window update
* @update_plane: apply hardware specific overlay data to registers. * @update_plane: apply hardware specific overlay data to registers.
...@@ -106,6 +109,8 @@ struct exynos_drm_crtc_ops { ...@@ -106,6 +109,8 @@ struct exynos_drm_crtc_ops {
int (*enable_vblank)(struct exynos_drm_crtc *crtc); int (*enable_vblank)(struct exynos_drm_crtc *crtc);
void (*disable_vblank)(struct exynos_drm_crtc *crtc); void (*disable_vblank)(struct exynos_drm_crtc *crtc);
void (*wait_for_vblank)(struct exynos_drm_crtc *crtc); void (*wait_for_vblank)(struct exynos_drm_crtc *crtc);
int (*atomic_check)(struct exynos_drm_crtc *crtc,
struct drm_crtc_state *state);
void (*atomic_begin)(struct exynos_drm_crtc *crtc, void (*atomic_begin)(struct exynos_drm_crtc *crtc,
struct exynos_drm_plane *plane); struct exynos_drm_plane *plane);
void (*update_plane)(struct exynos_drm_crtc *crtc, void (*update_plane)(struct exynos_drm_crtc *crtc,
......
...@@ -32,15 +32,15 @@ ...@@ -32,15 +32,15 @@
* exynos specific framebuffer structure. * exynos specific framebuffer structure.
* *
* @fb: drm framebuffer obejct. * @fb: drm framebuffer obejct.
* @exynos_gem_obj: array of exynos specific gem object containing a gem object. * @exynos_gem: array of exynos specific gem object containing a gem object.
*/ */
struct exynos_drm_fb { struct exynos_drm_fb {
struct drm_framebuffer fb; struct drm_framebuffer fb;
struct exynos_drm_gem_obj *exynos_gem_obj[MAX_FB_BUFFER]; struct exynos_drm_gem *exynos_gem[MAX_FB_BUFFER];
}; };
static int check_fb_gem_memory_type(struct drm_device *drm_dev, static int check_fb_gem_memory_type(struct drm_device *drm_dev,
struct exynos_drm_gem_obj *exynos_gem_obj) struct exynos_drm_gem *exynos_gem)
{ {
unsigned int flags; unsigned int flags;
...@@ -51,7 +51,7 @@ static int check_fb_gem_memory_type(struct drm_device *drm_dev, ...@@ -51,7 +51,7 @@ static int check_fb_gem_memory_type(struct drm_device *drm_dev,
if (is_drm_iommu_supported(drm_dev)) if (is_drm_iommu_supported(drm_dev))
return 0; return 0;
flags = exynos_gem_obj->flags; flags = exynos_gem->flags;
/* /*
* without iommu support, not support physically non-continuous memory * without iommu support, not support physically non-continuous memory
...@@ -75,13 +75,13 @@ static void exynos_drm_fb_destroy(struct drm_framebuffer *fb) ...@@ -75,13 +75,13 @@ static void exynos_drm_fb_destroy(struct drm_framebuffer *fb)
drm_framebuffer_cleanup(fb); drm_framebuffer_cleanup(fb);
for (i = 0; i < ARRAY_SIZE(exynos_fb->exynos_gem_obj); i++) { for (i = 0; i < ARRAY_SIZE(exynos_fb->exynos_gem); i++) {
struct drm_gem_object *obj; struct drm_gem_object *obj;
if (exynos_fb->exynos_gem_obj[i] == NULL) if (exynos_fb->exynos_gem[i] == NULL)
continue; continue;
obj = &exynos_fb->exynos_gem_obj[i]->base; obj = &exynos_fb->exynos_gem[i]->base;
drm_gem_object_unreference_unlocked(obj); drm_gem_object_unreference_unlocked(obj);
} }
...@@ -96,7 +96,7 @@ static int exynos_drm_fb_create_handle(struct drm_framebuffer *fb, ...@@ -96,7 +96,7 @@ static int exynos_drm_fb_create_handle(struct drm_framebuffer *fb,
struct exynos_drm_fb *exynos_fb = to_exynos_fb(fb); struct exynos_drm_fb *exynos_fb = to_exynos_fb(fb);
return drm_gem_handle_create(file_priv, return drm_gem_handle_create(file_priv,
&exynos_fb->exynos_gem_obj[0]->base, handle); &exynos_fb->exynos_gem[0]->base, handle);
} }
static int exynos_drm_fb_dirty(struct drm_framebuffer *fb, static int exynos_drm_fb_dirty(struct drm_framebuffer *fb,
...@@ -118,7 +118,7 @@ static struct drm_framebuffer_funcs exynos_drm_fb_funcs = { ...@@ -118,7 +118,7 @@ static struct drm_framebuffer_funcs exynos_drm_fb_funcs = {
struct drm_framebuffer * struct drm_framebuffer *
exynos_drm_framebuffer_init(struct drm_device *dev, exynos_drm_framebuffer_init(struct drm_device *dev,
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_mode_fb_cmd2 *mode_cmd,
struct exynos_drm_gem_obj **gem_obj, struct exynos_drm_gem **exynos_gem,
int count) int count)
{ {
struct exynos_drm_fb *exynos_fb; struct exynos_drm_fb *exynos_fb;
...@@ -130,11 +130,11 @@ exynos_drm_framebuffer_init(struct drm_device *dev, ...@@ -130,11 +130,11 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
ret = check_fb_gem_memory_type(dev, gem_obj[i]); ret = check_fb_gem_memory_type(dev, exynos_gem[i]);
if (ret < 0) if (ret < 0)
goto err; goto err;
exynos_fb->exynos_gem_obj[i] = gem_obj[i]; exynos_fb->exynos_gem[i] = exynos_gem[i];
} }
drm_helper_mode_fill_fb_struct(&exynos_fb->fb, mode_cmd); drm_helper_mode_fill_fb_struct(&exynos_fb->fb, mode_cmd);
...@@ -156,7 +156,7 @@ static struct drm_framebuffer * ...@@ -156,7 +156,7 @@ static struct drm_framebuffer *
exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
struct drm_mode_fb_cmd2 *mode_cmd) struct drm_mode_fb_cmd2 *mode_cmd)
{ {
struct exynos_drm_gem_obj *gem_objs[MAX_FB_BUFFER]; struct exynos_drm_gem *exynos_gem[MAX_FB_BUFFER];
struct drm_gem_object *obj; struct drm_gem_object *obj;
struct drm_framebuffer *fb; struct drm_framebuffer *fb;
int i; int i;
...@@ -171,10 +171,10 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, ...@@ -171,10 +171,10 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
goto err; goto err;
} }
gem_objs[i] = to_exynos_gem_obj(obj); exynos_gem[i] = to_exynos_gem(obj);
} }
fb = exynos_drm_framebuffer_init(dev, mode_cmd, gem_objs, i); fb = exynos_drm_framebuffer_init(dev, mode_cmd, exynos_gem, i);
if (IS_ERR(fb)) { if (IS_ERR(fb)) {
ret = PTR_ERR(fb); ret = PTR_ERR(fb);
goto err; goto err;
...@@ -184,27 +184,26 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, ...@@ -184,27 +184,26 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
err: err:
while (i--) while (i--)
drm_gem_object_unreference_unlocked(&gem_objs[i]->base); drm_gem_object_unreference_unlocked(&exynos_gem[i]->base);
return ERR_PTR(ret); return ERR_PTR(ret);
} }
struct exynos_drm_gem_obj *exynos_drm_fb_gem_obj(struct drm_framebuffer *fb, struct exynos_drm_gem *exynos_drm_fb_gem(struct drm_framebuffer *fb, int index)
int index)
{ {
struct exynos_drm_fb *exynos_fb = to_exynos_fb(fb); struct exynos_drm_fb *exynos_fb = to_exynos_fb(fb);
struct exynos_drm_gem_obj *obj; struct exynos_drm_gem *exynos_gem;
if (index >= MAX_FB_BUFFER) if (index >= MAX_FB_BUFFER)
return NULL; return NULL;
obj = exynos_fb->exynos_gem_obj[index]; exynos_gem = exynos_fb->exynos_gem[index];
if (!obj) if (!exynos_gem)
return NULL; return NULL;
DRM_DEBUG_KMS("dma_addr = 0x%lx\n", (unsigned long)obj->dma_addr); DRM_DEBUG_KMS("dma_addr: 0x%lx\n", (unsigned long)exynos_gem->dma_addr);
return obj; return exynos_gem;
} }
static void exynos_drm_output_poll_changed(struct drm_device *dev) static void exynos_drm_output_poll_changed(struct drm_device *dev)
......
...@@ -19,12 +19,11 @@ ...@@ -19,12 +19,11 @@
struct drm_framebuffer * struct drm_framebuffer *
exynos_drm_framebuffer_init(struct drm_device *dev, exynos_drm_framebuffer_init(struct drm_device *dev,
struct drm_mode_fb_cmd2 *mode_cmd, struct drm_mode_fb_cmd2 *mode_cmd,
struct exynos_drm_gem_obj **gem_obj, struct exynos_drm_gem **exynos_gem,
int count); int count);
/* get gem object of a drm framebuffer */ /* get gem object of a drm framebuffer */
struct exynos_drm_gem_obj *exynos_drm_fb_gem_obj(struct drm_framebuffer *fb, struct exynos_drm_gem *exynos_drm_fb_gem(struct drm_framebuffer *fb, int index);
int index);
void exynos_drm_mode_config_init(struct drm_device *dev); void exynos_drm_mode_config_init(struct drm_device *dev);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
struct exynos_drm_fbdev { struct exynos_drm_fbdev {
struct drm_fb_helper drm_fb_helper; struct drm_fb_helper drm_fb_helper;
struct exynos_drm_gem_obj *obj; struct exynos_drm_gem *exynos_gem;
}; };
static int exynos_drm_fb_mmap(struct fb_info *info, static int exynos_drm_fb_mmap(struct fb_info *info,
...@@ -39,7 +39,7 @@ static int exynos_drm_fb_mmap(struct fb_info *info, ...@@ -39,7 +39,7 @@ static int exynos_drm_fb_mmap(struct fb_info *info,
{ {
struct drm_fb_helper *helper = info->par; struct drm_fb_helper *helper = info->par;
struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(helper); struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(helper);
struct exynos_drm_gem_obj *obj = exynos_fbd->obj; struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;
unsigned long vm_size; unsigned long vm_size;
int ret; int ret;
...@@ -47,11 +47,12 @@ static int exynos_drm_fb_mmap(struct fb_info *info, ...@@ -47,11 +47,12 @@ static int exynos_drm_fb_mmap(struct fb_info *info,
vm_size = vma->vm_end - vma->vm_start; vm_size = vma->vm_end - vma->vm_start;
if (vm_size > obj->size) if (vm_size > exynos_gem->size)
return -EINVAL; return -EINVAL;
ret = dma_mmap_attrs(helper->dev->dev, vma, obj->pages, obj->dma_addr, ret = dma_mmap_attrs(helper->dev->dev, vma, exynos_gem->pages,
obj->size, &obj->dma_attrs); exynos_gem->dma_addr, exynos_gem->size,
&exynos_gem->dma_attrs);
if (ret < 0) { if (ret < 0) {
DRM_ERROR("failed to mmap.\n"); DRM_ERROR("failed to mmap.\n");
return ret; return ret;
...@@ -75,7 +76,7 @@ static struct fb_ops exynos_drm_fb_ops = { ...@@ -75,7 +76,7 @@ static struct fb_ops exynos_drm_fb_ops = {
static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes, struct drm_fb_helper_surface_size *sizes,
struct exynos_drm_gem_obj *obj) struct exynos_drm_gem *exynos_gem)
{ {
struct fb_info *fbi; struct fb_info *fbi;
struct drm_framebuffer *fb = helper->fb; struct drm_framebuffer *fb = helper->fb;
...@@ -96,11 +97,11 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, ...@@ -96,11 +97,11 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth); drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth);
drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height); drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
nr_pages = obj->size >> PAGE_SHIFT; nr_pages = exynos_gem->size >> PAGE_SHIFT;
obj->kvaddr = (void __iomem *) vmap(obj->pages, nr_pages, VM_MAP, exynos_gem->kvaddr = (void __iomem *) vmap(exynos_gem->pages, nr_pages,
pgprot_writecombine(PAGE_KERNEL)); VM_MAP, pgprot_writecombine(PAGE_KERNEL));
if (!obj->kvaddr) { if (!exynos_gem->kvaddr) {
DRM_ERROR("failed to map pages to kernel space.\n"); DRM_ERROR("failed to map pages to kernel space.\n");
drm_fb_helper_release_fbi(helper); drm_fb_helper_release_fbi(helper);
return -EIO; return -EIO;
...@@ -109,7 +110,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, ...@@ -109,7 +110,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
offset = fbi->var.xoffset * (fb->bits_per_pixel >> 3); offset = fbi->var.xoffset * (fb->bits_per_pixel >> 3);
offset += fbi->var.yoffset * fb->pitches[0]; offset += fbi->var.yoffset * fb->pitches[0];
fbi->screen_base = obj->kvaddr + offset; fbi->screen_base = exynos_gem->kvaddr + offset;
fbi->screen_size = size; fbi->screen_size = size;
fbi->fix.smem_len = size; fbi->fix.smem_len = size;
...@@ -120,7 +121,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -120,7 +121,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes) struct drm_fb_helper_surface_size *sizes)
{ {
struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper);
struct exynos_drm_gem_obj *obj; struct exynos_drm_gem *exynos_gem;
struct drm_device *dev = helper->dev; struct drm_device *dev = helper->dev;
struct drm_mode_fb_cmd2 mode_cmd = { 0 }; struct drm_mode_fb_cmd2 mode_cmd = { 0 };
struct platform_device *pdev = dev->platformdev; struct platform_device *pdev = dev->platformdev;
...@@ -141,32 +142,34 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -141,32 +142,34 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
size = mode_cmd.pitches[0] * mode_cmd.height; size = mode_cmd.pitches[0] * mode_cmd.height;
obj = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size); exynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size);
/* /*
* If physically contiguous memory allocation fails and if IOMMU is * If physically contiguous memory allocation fails and if IOMMU is
* supported then try to get buffer from non physically contiguous * supported then try to get buffer from non physically contiguous
* memory area. * memory area.
*/ */
if (IS_ERR(obj) && is_drm_iommu_supported(dev)) { if (IS_ERR(exynos_gem) && is_drm_iommu_supported(dev)) {
dev_warn(&pdev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n"); dev_warn(&pdev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n");
obj = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG, size); exynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG,
size);
} }
if (IS_ERR(obj)) { if (IS_ERR(exynos_gem)) {
ret = PTR_ERR(obj); ret = PTR_ERR(exynos_gem);
goto out; goto out;
} }
exynos_fbdev->obj = obj; exynos_fbdev->exynos_gem = exynos_gem;
helper->fb = exynos_drm_framebuffer_init(dev, &mode_cmd, &obj, 1); helper->fb =
exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1);
if (IS_ERR(helper->fb)) { if (IS_ERR(helper->fb)) {
DRM_ERROR("failed to create drm framebuffer.\n"); DRM_ERROR("failed to create drm framebuffer.\n");
ret = PTR_ERR(helper->fb); ret = PTR_ERR(helper->fb);
goto err_destroy_gem; goto err_destroy_gem;
} }
ret = exynos_drm_fbdev_update(helper, sizes, obj); ret = exynos_drm_fbdev_update(helper, sizes, exynos_gem);
if (ret < 0) if (ret < 0)
goto err_destroy_framebuffer; goto err_destroy_framebuffer;
...@@ -176,7 +179,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -176,7 +179,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
err_destroy_framebuffer: err_destroy_framebuffer:
drm_framebuffer_cleanup(helper->fb); drm_framebuffer_cleanup(helper->fb);
err_destroy_gem: err_destroy_gem:
exynos_drm_gem_destroy(obj); exynos_drm_gem_destroy(exynos_gem);
/* /*
* if failed, all resources allocated above would be released by * if failed, all resources allocated above would be released by
...@@ -269,11 +272,11 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev, ...@@ -269,11 +272,11 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
struct drm_fb_helper *fb_helper) struct drm_fb_helper *fb_helper)
{ {
struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(fb_helper); struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(fb_helper);
struct exynos_drm_gem_obj *obj = exynos_fbd->obj; struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;
struct drm_framebuffer *fb; struct drm_framebuffer *fb;
if (obj->kvaddr) if (exynos_gem->kvaddr)
vunmap(obj->kvaddr); vunmap(exynos_gem->kvaddr);
/* release drm framebuffer and real buffer */ /* release drm framebuffer and real buffer */
if (fb_helper->fb && fb_helper->fb->funcs) { if (fb_helper->fb && fb_helper->fb->funcs) {
......
...@@ -466,7 +466,7 @@ static int fimc_src_set_fmt_order(struct fimc_context *ctx, u32 fmt) ...@@ -466,7 +466,7 @@ static int fimc_src_set_fmt_order(struct fimc_context *ctx, u32 fmt)
EXYNOS_MSCTRL_C_INT_IN_2PLANE); EXYNOS_MSCTRL_C_INT_IN_2PLANE);
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid source yuv order 0x%x.\n", fmt); dev_err(ippdrv->dev, "invalid source yuv order 0x%x.\n", fmt);
return -EINVAL; return -EINVAL;
} }
...@@ -513,7 +513,7 @@ static int fimc_src_set_fmt(struct device *dev, u32 fmt) ...@@ -513,7 +513,7 @@ static int fimc_src_set_fmt(struct device *dev, u32 fmt)
cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR420; cfg |= EXYNOS_MSCTRL_INFORMAT_YCBCR420;
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid source format 0x%x.\n", fmt); dev_err(ippdrv->dev, "invalid source format 0x%x.\n", fmt);
return -EINVAL; return -EINVAL;
} }
...@@ -578,7 +578,7 @@ static int fimc_src_set_transf(struct device *dev, ...@@ -578,7 +578,7 @@ static int fimc_src_set_transf(struct device *dev,
cfg1 &= ~EXYNOS_MSCTRL_FLIP_Y_MIRROR; cfg1 &= ~EXYNOS_MSCTRL_FLIP_Y_MIRROR;
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid degree value %d.\n", degree); dev_err(ippdrv->dev, "invalid degree value %d.\n", degree);
return -EINVAL; return -EINVAL;
} }
...@@ -701,7 +701,7 @@ static int fimc_src_set_addr(struct device *dev, ...@@ -701,7 +701,7 @@ static int fimc_src_set_addr(struct device *dev,
property->prop_id, buf_id, buf_type); property->prop_id, buf_id, buf_type);
if (buf_id > FIMC_MAX_SRC) { if (buf_id > FIMC_MAX_SRC) {
dev_info(ippdrv->dev, "inavlid buf_id %d.\n", buf_id); dev_info(ippdrv->dev, "invalid buf_id %d.\n", buf_id);
return -ENOMEM; return -ENOMEM;
} }
...@@ -812,7 +812,7 @@ static int fimc_dst_set_fmt_order(struct fimc_context *ctx, u32 fmt) ...@@ -812,7 +812,7 @@ static int fimc_dst_set_fmt_order(struct fimc_context *ctx, u32 fmt)
cfg |= EXYNOS_CIOCTRL_YCBCR_2PLANE; cfg |= EXYNOS_CIOCTRL_YCBCR_2PLANE;
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid target yuv order 0x%x.\n", fmt); dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
return -EINVAL; return -EINVAL;
} }
...@@ -865,7 +865,7 @@ static int fimc_dst_set_fmt(struct device *dev, u32 fmt) ...@@ -865,7 +865,7 @@ static int fimc_dst_set_fmt(struct device *dev, u32 fmt)
cfg |= EXYNOS_CITRGFMT_OUTFORMAT_YCBCR420; cfg |= EXYNOS_CITRGFMT_OUTFORMAT_YCBCR420;
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid target format 0x%x.\n", dev_err(ippdrv->dev, "invalid target format 0x%x.\n",
fmt); fmt);
return -EINVAL; return -EINVAL;
} }
...@@ -929,7 +929,7 @@ static int fimc_dst_set_transf(struct device *dev, ...@@ -929,7 +929,7 @@ static int fimc_dst_set_transf(struct device *dev,
cfg &= ~EXYNOS_CITRGFMT_FLIP_Y_MIRROR; cfg &= ~EXYNOS_CITRGFMT_FLIP_Y_MIRROR;
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid degree value %d.\n", degree); dev_err(ippdrv->dev, "invalid degree value %d.\n", degree);
return -EINVAL; return -EINVAL;
} }
...@@ -1160,7 +1160,7 @@ static int fimc_dst_set_addr(struct device *dev, ...@@ -1160,7 +1160,7 @@ static int fimc_dst_set_addr(struct device *dev,
property->prop_id, buf_id, buf_type); property->prop_id, buf_id, buf_type);
if (buf_id > FIMC_MAX_DST) { if (buf_id > FIMC_MAX_DST) {
dev_info(ippdrv->dev, "inavlid buf_id %d.\n", buf_id); dev_info(ippdrv->dev, "invalid buf_id %d.\n", buf_id);
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
/* FIMD has totally five hardware windows. */ /* FIMD has totally five hardware windows. */
#define WINDOWS_NR 5 #define WINDOWS_NR 5
#define CURSOR_WIN 4
struct fimd_driver_data { struct fimd_driver_data {
unsigned int timing_base; unsigned int timing_base;
...@@ -153,7 +154,6 @@ struct fimd_context { ...@@ -153,7 +154,6 @@ struct fimd_context {
struct clk *lcd_clk; struct clk *lcd_clk;
void __iomem *regs; void __iomem *regs;
struct regmap *sysreg; struct regmap *sysreg;
unsigned int default_win;
unsigned long irq_flags; unsigned long irq_flags;
u32 vidcon0; u32 vidcon0;
u32 vidcon1; u32 vidcon1;
...@@ -949,8 +949,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data) ...@@ -949,8 +949,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
ctx->pipe = priv->pipe++; ctx->pipe = priv->pipe++;
for (zpos = 0; zpos < WINDOWS_NR; zpos++) { for (zpos = 0; zpos < WINDOWS_NR; zpos++) {
type = (zpos == ctx->default_win) ? DRM_PLANE_TYPE_PRIMARY : type = exynos_plane_get_type(zpos, CURSOR_WIN);
DRM_PLANE_TYPE_OVERLAY;
ret = exynos_plane_init(drm_dev, &ctx->planes[zpos], ret = exynos_plane_init(drm_dev, &ctx->planes[zpos],
1 << ctx->pipe, type, fimd_formats, 1 << ctx->pipe, type, fimd_formats,
ARRAY_SIZE(fimd_formats), zpos); ARRAY_SIZE(fimd_formats), zpos);
...@@ -958,7 +957,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data) ...@@ -958,7 +957,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
return ret; return ret;
} }
exynos_plane = &ctx->planes[ctx->default_win]; exynos_plane = &ctx->planes[DEFAULT_WIN];
ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD, ctx->pipe, EXYNOS_DISPLAY_TYPE_LCD,
&fimd_crtc_ops, ctx); &fimd_crtc_ops, ctx);
......
This diff is collapsed.
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
#include <drm/drm_gem.h> #include <drm/drm_gem.h>
#define to_exynos_gem_obj(x) container_of(x,\ #define to_exynos_gem(x) container_of(x, struct exynos_drm_gem, base)
struct exynos_drm_gem_obj, base)
#define IS_NONCONTIG_BUFFER(f) (f & EXYNOS_BO_NONCONTIG) #define IS_NONCONTIG_BUFFER(f) (f & EXYNOS_BO_NONCONTIG)
...@@ -44,7 +43,7 @@ ...@@ -44,7 +43,7 @@
* P.S. this object would be transferred to user as kms_bo.handle so * P.S. this object would be transferred to user as kms_bo.handle so
* user can access the buffer through kms_bo.handle. * user can access the buffer through kms_bo.handle.
*/ */
struct exynos_drm_gem_obj { struct exynos_drm_gem {
struct drm_gem_object base; struct drm_gem_object base;
unsigned int flags; unsigned int flags;
unsigned long size; unsigned long size;
...@@ -59,10 +58,10 @@ struct exynos_drm_gem_obj { ...@@ -59,10 +58,10 @@ struct exynos_drm_gem_obj {
struct page **exynos_gem_get_pages(struct drm_gem_object *obj, gfp_t gfpmask); struct page **exynos_gem_get_pages(struct drm_gem_object *obj, gfp_t gfpmask);
/* destroy a buffer with gem object */ /* destroy a buffer with gem object */
void exynos_drm_gem_destroy(struct exynos_drm_gem_obj *exynos_gem_obj); void exynos_drm_gem_destroy(struct exynos_drm_gem *exynos_gem);
/* create a new buffer with gem object */ /* create a new buffer with gem object */
struct exynos_drm_gem_obj *exynos_drm_gem_create(struct drm_device *dev, struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev,
unsigned int flags, unsigned int flags,
unsigned long size); unsigned long size);
...@@ -106,7 +105,7 @@ unsigned long exynos_drm_gem_get_size(struct drm_device *dev, ...@@ -106,7 +105,7 @@ unsigned long exynos_drm_gem_get_size(struct drm_device *dev,
struct drm_file *file_priv); struct drm_file *file_priv);
/* free gem object. */ /* free gem object. */
void exynos_drm_gem_free_object(struct drm_gem_object *gem_obj); void exynos_drm_gem_free_object(struct drm_gem_object *obj);
/* create memory region for drm framebuffer. */ /* create memory region for drm framebuffer. */
int exynos_drm_gem_dumb_create(struct drm_file *file_priv, int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
......
...@@ -543,7 +543,7 @@ static int gsc_src_set_fmt(struct device *dev, u32 fmt) ...@@ -543,7 +543,7 @@ static int gsc_src_set_fmt(struct device *dev, u32 fmt)
GSC_IN_YUV420_2P); GSC_IN_YUV420_2P);
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid target yuv order 0x%x.\n", fmt); dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
return -EINVAL; return -EINVAL;
} }
...@@ -595,7 +595,7 @@ static int gsc_src_set_transf(struct device *dev, ...@@ -595,7 +595,7 @@ static int gsc_src_set_transf(struct device *dev,
cfg &= ~GSC_IN_ROT_YFLIP; cfg &= ~GSC_IN_ROT_YFLIP;
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid degree value %d.\n", degree); dev_err(ippdrv->dev, "invalid degree value %d.\n", degree);
return -EINVAL; return -EINVAL;
} }
...@@ -721,7 +721,7 @@ static int gsc_src_set_addr(struct device *dev, ...@@ -721,7 +721,7 @@ static int gsc_src_set_addr(struct device *dev,
property->prop_id, buf_id, buf_type); property->prop_id, buf_id, buf_type);
if (buf_id > GSC_MAX_SRC) { if (buf_id > GSC_MAX_SRC) {
dev_info(ippdrv->dev, "inavlid buf_id %d.\n", buf_id); dev_info(ippdrv->dev, "invalid buf_id %d.\n", buf_id);
return -EINVAL; return -EINVAL;
} }
...@@ -814,7 +814,7 @@ static int gsc_dst_set_fmt(struct device *dev, u32 fmt) ...@@ -814,7 +814,7 @@ static int gsc_dst_set_fmt(struct device *dev, u32 fmt)
GSC_OUT_YUV420_2P); GSC_OUT_YUV420_2P);
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid target yuv order 0x%x.\n", fmt); dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
return -EINVAL; return -EINVAL;
} }
...@@ -866,7 +866,7 @@ static int gsc_dst_set_transf(struct device *dev, ...@@ -866,7 +866,7 @@ static int gsc_dst_set_transf(struct device *dev,
cfg &= ~GSC_IN_ROT_YFLIP; cfg &= ~GSC_IN_ROT_YFLIP;
break; break;
default: default:
dev_err(ippdrv->dev, "inavlid degree value %d.\n", degree); dev_err(ippdrv->dev, "invalid degree value %d.\n", degree);
return -EINVAL; return -EINVAL;
} }
...@@ -1176,7 +1176,7 @@ static int gsc_dst_set_addr(struct device *dev, ...@@ -1176,7 +1176,7 @@ static int gsc_dst_set_addr(struct device *dev,
property->prop_id, buf_id, buf_type); property->prop_id, buf_id, buf_type);
if (buf_id > GSC_MAX_DST) { if (buf_id > GSC_MAX_DST) {
dev_info(ippdrv->dev, "inavlid buf_id %d.\n", buf_id); dev_info(ippdrv->dev, "invalid buf_id %d.\n", buf_id);
return -EINVAL; return -EINVAL;
} }
......
...@@ -139,6 +139,5 @@ void drm_iommu_detach_device(struct drm_device *drm_dev, ...@@ -139,6 +139,5 @@ void drm_iommu_detach_device(struct drm_device *drm_dev,
if (!mapping || !mapping->domain) if (!mapping || !mapping->domain)
return; return;
iommu_detach_device(mapping->domain, subdrv_dev); arm_iommu_detach_device(subdrv_dev);
drm_release_iommu_mapping(drm_dev);
} }
...@@ -128,15 +128,14 @@ static int exynos_plane_atomic_check(struct drm_plane *plane, ...@@ -128,15 +128,14 @@ static int exynos_plane_atomic_check(struct drm_plane *plane,
nr = drm_format_num_planes(state->fb->pixel_format); nr = drm_format_num_planes(state->fb->pixel_format);
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
struct exynos_drm_gem_obj *obj = struct exynos_drm_gem *exynos_gem =
exynos_drm_fb_gem_obj(state->fb, i); exynos_drm_fb_gem(state->fb, i);
if (!exynos_gem) {
if (!obj) {
DRM_DEBUG_KMS("gem object is null\n"); DRM_DEBUG_KMS("gem object is null\n");
return -EFAULT; return -EFAULT;
} }
exynos_plane->dma_addr[i] = obj->dma_addr + exynos_plane->dma_addr[i] = exynos_gem->dma_addr +
state->fb->offsets[i]; state->fb->offsets[i];
DRM_DEBUG_KMS("buffer: %d, dma_addr = 0x%lx\n", DRM_DEBUG_KMS("buffer: %d, dma_addr = 0x%lx\n",
...@@ -208,6 +207,17 @@ static void exynos_plane_attach_zpos_property(struct drm_plane *plane, ...@@ -208,6 +207,17 @@ static void exynos_plane_attach_zpos_property(struct drm_plane *plane,
drm_object_attach_property(&plane->base, prop, zpos); drm_object_attach_property(&plane->base, prop, zpos);
} }
enum drm_plane_type exynos_plane_get_type(unsigned int zpos,
unsigned int cursor_win)
{
if (zpos == DEFAULT_WIN)
return DRM_PLANE_TYPE_PRIMARY;
else if (zpos == cursor_win)
return DRM_PLANE_TYPE_CURSOR;
else
return DRM_PLANE_TYPE_OVERLAY;
}
int exynos_plane_init(struct drm_device *dev, int exynos_plane_init(struct drm_device *dev,
struct exynos_drm_plane *exynos_plane, struct exynos_drm_plane *exynos_plane,
unsigned long possible_crtcs, enum drm_plane_type type, unsigned long possible_crtcs, enum drm_plane_type type,
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
* *
*/ */
enum drm_plane_type exynos_plane_get_type(unsigned int zpos,
unsigned int cursor_win);
int exynos_plane_init(struct drm_device *dev, int exynos_plane_init(struct drm_device *dev,
struct exynos_drm_plane *exynos_plane, struct exynos_drm_plane *exynos_plane,
unsigned long possible_crtcs, enum drm_plane_type type, unsigned long possible_crtcs, enum drm_plane_type type,
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
/* vidi has totally three virtual windows. */ /* vidi has totally three virtual windows. */
#define WINDOWS_NR 3 #define WINDOWS_NR 3
#define CURSOR_WIN 2
#define ctx_from_connector(c) container_of(c, struct vidi_context, \ #define ctx_from_connector(c) container_of(c, struct vidi_context, \
connector) connector)
...@@ -42,7 +43,6 @@ struct vidi_context { ...@@ -42,7 +43,6 @@ struct vidi_context {
struct exynos_drm_plane planes[WINDOWS_NR]; struct exynos_drm_plane planes[WINDOWS_NR];
struct edid *raw_edid; struct edid *raw_edid;
unsigned int clkdiv; unsigned int clkdiv;
unsigned int default_win;
unsigned long irq_flags; unsigned long irq_flags;
unsigned int connected; unsigned int connected;
bool vblank_on; bool vblank_on;
...@@ -446,8 +446,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data) ...@@ -446,8 +446,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
vidi_ctx_initialize(ctx, drm_dev); vidi_ctx_initialize(ctx, drm_dev);
for (zpos = 0; zpos < WINDOWS_NR; zpos++) { for (zpos = 0; zpos < WINDOWS_NR; zpos++) {
type = (zpos == ctx->default_win) ? DRM_PLANE_TYPE_PRIMARY : type = exynos_plane_get_type(zpos, CURSOR_WIN);
DRM_PLANE_TYPE_OVERLAY;
ret = exynos_plane_init(drm_dev, &ctx->planes[zpos], ret = exynos_plane_init(drm_dev, &ctx->planes[zpos],
1 << ctx->pipe, type, formats, 1 << ctx->pipe, type, formats,
ARRAY_SIZE(formats), zpos); ARRAY_SIZE(formats), zpos);
...@@ -455,7 +454,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data) ...@@ -455,7 +454,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
return ret; return ret;
} }
exynos_plane = &ctx->planes[ctx->default_win]; exynos_plane = &ctx->planes[DEFAULT_WIN];
ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
ctx->pipe, EXYNOS_DISPLAY_TYPE_VIDI, ctx->pipe, EXYNOS_DISPLAY_TYPE_VIDI,
&vidi_crtc_ops, ctx); &vidi_crtc_ops, ctx);
...@@ -507,7 +506,6 @@ static int vidi_probe(struct platform_device *pdev) ...@@ -507,7 +506,6 @@ static int vidi_probe(struct platform_device *pdev)
if (!ctx) if (!ctx)
return -ENOMEM; return -ENOMEM;
ctx->default_win = 0;
ctx->pdev = pdev; ctx->pdev = pdev;
INIT_WORK(&ctx->work, vidi_fake_vblank_handler); INIT_WORK(&ctx->work, vidi_fake_vblank_handler);
......
This diff is collapsed.
...@@ -39,11 +39,10 @@ ...@@ -39,11 +39,10 @@
#include "exynos_drm_crtc.h" #include "exynos_drm_crtc.h"
#include "exynos_drm_plane.h" #include "exynos_drm_plane.h"
#include "exynos_drm_iommu.h" #include "exynos_drm_iommu.h"
#include "exynos_mixer.h"
#define MIXER_WIN_NR 3 #define MIXER_WIN_NR 3
#define MIXER_DEFAULT_WIN 0
#define VP_DEFAULT_WIN 2 #define VP_DEFAULT_WIN 2
#define CURSOR_WIN 1
/* The pixelformats that are natively supported by the mixer. */ /* The pixelformats that are natively supported by the mixer. */
#define MXR_FORMAT_RGB565 4 #define MXR_FORMAT_RGB565 4
...@@ -600,7 +599,7 @@ static void mixer_graph_buffer(struct mixer_context *ctx, ...@@ -600,7 +599,7 @@ static void mixer_graph_buffer(struct mixer_context *ctx,
/* setup display size */ /* setup display size */
if (ctx->mxr_ver == MXR_VER_128_0_0_184 && if (ctx->mxr_ver == MXR_VER_128_0_0_184 &&
win == MIXER_DEFAULT_WIN) { win == DEFAULT_WIN) {
val = MXR_MXR_RES_HEIGHT(mode->vdisplay); val = MXR_MXR_RES_HEIGHT(mode->vdisplay);
val |= MXR_MXR_RES_WIDTH(mode->hdisplay); val |= MXR_MXR_RES_WIDTH(mode->hdisplay);
mixer_reg_write(res, MXR_RESOLUTION, val); mixer_reg_write(res, MXR_RESOLUTION, val);
...@@ -652,7 +651,7 @@ static void vp_win_reset(struct mixer_context *ctx) ...@@ -652,7 +651,7 @@ static void vp_win_reset(struct mixer_context *ctx)
/* waiting until VP_SRESET_PROCESSING is 0 */ /* waiting until VP_SRESET_PROCESSING is 0 */
if (~vp_reg_read(res, VP_SRESET) & VP_SRESET_PROCESSING) if (~vp_reg_read(res, VP_SRESET) & VP_SRESET_PROCESSING)
break; break;
usleep_range(10000, 12000); mdelay(10);
} }
WARN(tries == 0, "failed to reset Video Processor\n"); WARN(tries == 0, "failed to reset Video Processor\n");
} }
...@@ -1096,8 +1095,10 @@ static void mixer_disable(struct exynos_drm_crtc *crtc) ...@@ -1096,8 +1095,10 @@ static void mixer_disable(struct exynos_drm_crtc *crtc)
} }
/* Only valid for Mixer version 16.0.33.0 */ /* Only valid for Mixer version 16.0.33.0 */
int mixer_check_mode(struct drm_display_mode *mode) static int mixer_atomic_check(struct exynos_drm_crtc *crtc,
struct drm_crtc_state *state)
{ {
struct drm_display_mode *mode = &state->adjusted_mode;
u32 w, h; u32 w, h;
w = mode->hdisplay; w = mode->hdisplay;
...@@ -1123,6 +1124,7 @@ static const struct exynos_drm_crtc_ops mixer_crtc_ops = { ...@@ -1123,6 +1124,7 @@ static const struct exynos_drm_crtc_ops mixer_crtc_ops = {
.wait_for_vblank = mixer_wait_for_vblank, .wait_for_vblank = mixer_wait_for_vblank,
.update_plane = mixer_update_plane, .update_plane = mixer_update_plane,
.disable_plane = mixer_disable_plane, .disable_plane = mixer_disable_plane,
.atomic_check = mixer_atomic_check,
}; };
static struct mixer_drv_data exynos5420_mxr_drv_data = { static struct mixer_drv_data exynos5420_mxr_drv_data = {
...@@ -1197,8 +1199,6 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data) ...@@ -1197,8 +1199,6 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data)
const uint32_t *formats; const uint32_t *formats;
unsigned int fcount; unsigned int fcount;
type = (zpos == MIXER_DEFAULT_WIN) ? DRM_PLANE_TYPE_PRIMARY :
DRM_PLANE_TYPE_OVERLAY;
if (zpos < VP_DEFAULT_WIN) { if (zpos < VP_DEFAULT_WIN) {
formats = mixer_formats; formats = mixer_formats;
fcount = ARRAY_SIZE(mixer_formats); fcount = ARRAY_SIZE(mixer_formats);
...@@ -1207,6 +1207,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data) ...@@ -1207,6 +1207,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data)
fcount = ARRAY_SIZE(vp_formats); fcount = ARRAY_SIZE(vp_formats);
} }
type = exynos_plane_get_type(zpos, CURSOR_WIN);
ret = exynos_plane_init(drm_dev, &ctx->planes[zpos], ret = exynos_plane_init(drm_dev, &ctx->planes[zpos],
1 << ctx->pipe, type, formats, fcount, 1 << ctx->pipe, type, formats, fcount,
zpos); zpos);
...@@ -1214,7 +1215,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data) ...@@ -1214,7 +1215,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data)
return ret; return ret;
} }
exynos_plane = &ctx->planes[MIXER_DEFAULT_WIN]; exynos_plane = &ctx->planes[DEFAULT_WIN];
ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base, ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
ctx->pipe, EXYNOS_DISPLAY_TYPE_HDMI, ctx->pipe, EXYNOS_DISPLAY_TYPE_HDMI,
&mixer_crtc_ops, ctx); &mixer_crtc_ops, ctx);
......
/*
* 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 _EXYNOS_MIXER_H_
#define _EXYNOS_MIXER_H_
/* This function returns 0 if the given timing is valid for the mixer */
int mixer_check_mode(struct drm_display_mode *mode);
#endif
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
#define HDMI_V13_V_SYNC_GEN_3_0 HDMI_CORE_BASE(0x0150) #define HDMI_V13_V_SYNC_GEN_3_0 HDMI_CORE_BASE(0x0150)
#define HDMI_V13_V_SYNC_GEN_3_1 HDMI_CORE_BASE(0x0154) #define HDMI_V13_V_SYNC_GEN_3_1 HDMI_CORE_BASE(0x0154)
#define HDMI_V13_V_SYNC_GEN_3_2 HDMI_CORE_BASE(0x0158) #define HDMI_V13_V_SYNC_GEN_3_2 HDMI_CORE_BASE(0x0158)
#define HDMI_V13_ACR_CON HDMI_CORE_BASE(0x0180)
#define HDMI_V13_AVI_CON HDMI_CORE_BASE(0x0300) #define HDMI_V13_AVI_CON HDMI_CORE_BASE(0x0300)
#define HDMI_V13_AVI_BYTE(n) HDMI_CORE_BASE(0x0320 + 4 * (n)) #define HDMI_V13_AVI_BYTE(n) HDMI_CORE_BASE(0x0320 + 4 * (n))
#define HDMI_V13_DC_CONTROL HDMI_CORE_BASE(0x05C0) #define HDMI_V13_DC_CONTROL HDMI_CORE_BASE(0x05C0)
...@@ -171,7 +170,7 @@ ...@@ -171,7 +170,7 @@
#define HDMI_HPD_ST HDMI_CTRL_BASE(0x0044) #define HDMI_HPD_ST HDMI_CTRL_BASE(0x0044)
#define HDMI_HPD_TH_X HDMI_CTRL_BASE(0x0050) #define HDMI_HPD_TH_X HDMI_CTRL_BASE(0x0050)
#define HDMI_AUDIO_CLKSEL HDMI_CTRL_BASE(0x0070) #define HDMI_AUDIO_CLKSEL HDMI_CTRL_BASE(0x0070)
#define HDMI_PHY_RSTOUT HDMI_CTRL_BASE(0x0074) #define HDMI_V14_PHY_RSTOUT HDMI_CTRL_BASE(0x0074)
#define HDMI_PHY_VPLL HDMI_CTRL_BASE(0x0078) #define HDMI_PHY_VPLL HDMI_CTRL_BASE(0x0078)
#define HDMI_PHY_CMU HDMI_CTRL_BASE(0x007C) #define HDMI_PHY_CMU HDMI_CTRL_BASE(0x007C)
#define HDMI_CORE_RSTOUT HDMI_CTRL_BASE(0x0080) #define HDMI_CORE_RSTOUT HDMI_CTRL_BASE(0x0080)
...@@ -277,16 +276,26 @@ ...@@ -277,16 +276,26 @@
#define HDMI_ASP_CHCFG2 HDMI_CORE_BASE(0x0318) #define HDMI_ASP_CHCFG2 HDMI_CORE_BASE(0x0318)
#define HDMI_ASP_CHCFG3 HDMI_CORE_BASE(0x031C) #define HDMI_ASP_CHCFG3 HDMI_CORE_BASE(0x031C)
#define HDMI_ACR_CON HDMI_CORE_BASE(0x0400) #define HDMI_V13_ACR_CON HDMI_CORE_BASE(0x0180)
#define HDMI_ACR_MCTS0 HDMI_CORE_BASE(0x0410) #define HDMI_V13_ACR_MCTS0 HDMI_CORE_BASE(0x0184)
#define HDMI_ACR_MCTS1 HDMI_CORE_BASE(0x0414) #define HDMI_V13_ACR_MCTS1 HDMI_CORE_BASE(0x0188)
#define HDMI_ACR_MCTS2 HDMI_CORE_BASE(0x0418) #define HDMI_V13_ACR_MCTS2 HDMI_CORE_BASE(0x018C)
#define HDMI_ACR_CTS0 HDMI_CORE_BASE(0x0420) #define HDMI_V13_ACR_CTS0 HDMI_CORE_BASE(0x0190)
#define HDMI_ACR_CTS1 HDMI_CORE_BASE(0x0424) #define HDMI_V13_ACR_CTS1 HDMI_CORE_BASE(0x0194)
#define HDMI_ACR_CTS2 HDMI_CORE_BASE(0x0428) #define HDMI_V13_ACR_CTS2 HDMI_CORE_BASE(0x0198)
#define HDMI_ACR_N0 HDMI_CORE_BASE(0x0430) #define HDMI_V13_ACR_N0 HDMI_CORE_BASE(0x01A0)
#define HDMI_ACR_N1 HDMI_CORE_BASE(0x0434) #define HDMI_V13_ACR_N1 HDMI_CORE_BASE(0x01A4)
#define HDMI_ACR_N2 HDMI_CORE_BASE(0x0438) #define HDMI_V13_ACR_N2 HDMI_CORE_BASE(0x01A8)
#define HDMI_V14_ACR_CON HDMI_CORE_BASE(0x0400)
#define HDMI_V14_ACR_MCTS0 HDMI_CORE_BASE(0x0410)
#define HDMI_V14_ACR_MCTS1 HDMI_CORE_BASE(0x0414)
#define HDMI_V14_ACR_MCTS2 HDMI_CORE_BASE(0x0418)
#define HDMI_V14_ACR_CTS0 HDMI_CORE_BASE(0x0420)
#define HDMI_V14_ACR_CTS1 HDMI_CORE_BASE(0x0424)
#define HDMI_V14_ACR_CTS2 HDMI_CORE_BASE(0x0428)
#define HDMI_V14_ACR_N0 HDMI_CORE_BASE(0x0430)
#define HDMI_V14_ACR_N1 HDMI_CORE_BASE(0x0434)
#define HDMI_V14_ACR_N2 HDMI_CORE_BASE(0x0438)
/* Packet related registers */ /* Packet related registers */
#define HDMI_ACP_CON HDMI_CORE_BASE(0x0500) #define HDMI_ACP_CON HDMI_CORE_BASE(0x0500)
......
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
/* VIDCON0 */ /* VIDCON0 */
#define VIDCON0_SWRESET (1 << 28) #define VIDCON0_SWRESET (1 << 28)
#define VIDCON0_CLKVALUP (1 << 14)
#define VIDCON0_VLCKFREE (1 << 5)
#define VIDCON0_STOP_STATUS (1 << 2) #define VIDCON0_STOP_STATUS (1 << 2)
#define VIDCON0_ENVID (1 << 1) #define VIDCON0_ENVID (1 << 1)
#define VIDCON0_ENVID_F (1 << 0) #define VIDCON0_ENVID_F (1 << 0)
...@@ -137,6 +139,13 @@ ...@@ -137,6 +139,13 @@
/* DECON_UPDATE */ /* DECON_UPDATE */
#define STANDALONE_UPDATE_F (1 << 0) #define STANDALONE_UPDATE_F (1 << 0)
/* DECON_VIDCON1 */
#define VIDCON1_VCLK_MASK (0x3 << 9)
#define VIDCON1_VCLK_RUN_VDEN_DISABLE (0x3 << 9)
#define VIDCON1_VCLK_HOLD (0x0 << 9)
#define VIDCON1_VCLK_RUN (0x1 << 9)
/* DECON_VIDTCON00 */ /* DECON_VIDTCON00 */
#define VIDTCON00_VBPD_F(x) (((x) & 0xfff) << 16) #define VIDTCON00_VBPD_F(x) (((x) & 0xfff) << 16)
#define VIDTCON00_VFPD_F(x) ((x) & 0xfff) #define VIDTCON00_VFPD_F(x) ((x) & 0xfff)
...@@ -159,7 +168,27 @@ ...@@ -159,7 +168,27 @@
#define TRIGCON_TRIGEN_PER_F (1 << 31) #define TRIGCON_TRIGEN_PER_F (1 << 31)
#define TRIGCON_TRIGEN_F (1 << 30) #define TRIGCON_TRIGEN_F (1 << 30)
#define TRIGCON_TE_AUTO_MASK (1 << 29) #define TRIGCON_TE_AUTO_MASK (1 << 29)
#define TRIGCON_WB_SWTRIGCMD (1 << 28)
#define TRIGCON_SWTRIGCMD_W4BUF (1 << 26)
#define TRIGCON_TRIGMODE_W4BUF (1 << 25)
#define TRIGCON_SWTRIGCMD_W3BUF (1 << 21)
#define TRIGCON_TRIGMODE_W3BUF (1 << 20)
#define TRIGCON_SWTRIGCMD_W2BUF (1 << 16)
#define TRIGCON_TRIGMODE_W2BUF (1 << 15)
#define TRIGCON_SWTRIGCMD_W1BUF (1 << 11)
#define TRIGCON_TRIGMODE_W1BUF (1 << 10)
#define TRIGCON_SWTRIGCMD_W0BUF (1 << 6)
#define TRIGCON_TRIGMODE_W0BUF (1 << 5)
#define TRIGCON_HWTRIGMASK_I80_RGB (1 << 4)
#define TRIGCON_HWTRIGEN_I80_RGB (1 << 3)
#define TRIGCON_HWTRIG_INV_I80_RGB (1 << 2)
#define TRIGCON_SWTRIGCMD (1 << 1) #define TRIGCON_SWTRIGCMD (1 << 1)
#define TRIGCON_SWTRIGEN (1 << 0) #define TRIGCON_SWTRIGEN (1 << 0)
/* DECON_CRCCTRL */
#define CRCCTRL_CRCCLKEN (0x1 << 2)
#define CRCCTRL_CRCSTART_F (0x1 << 1)
#define CRCCTRL_CRCEN (0x1 << 0)
#define CRCCTRL_MASK (0x7)
#endif /* EXYNOS_REGS_DECON_H */ #endif /* EXYNOS_REGS_DECON_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment