Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307497
b: refs/heads/master
c: d7f1642
h: refs/heads/master
i:
  307495: e0ceaae
v: v3
  • Loading branch information
Joonyoung Shim authored and Inki Dae committed May 17, 2012
1 parent cbc6b7d commit 037a0bd
Show file tree
Hide file tree
Showing 8 changed files with 1,080 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8dcb96b628a0749184bbcc5e6c94463f89405c58
refs/heads/master: d7f1642c90ab5eb2d7c48af0581c993094f97e1a
6 changes: 6 additions & 0 deletions trunk/drivers/gpu/drm/exynos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ config DRM_EXYNOS_VIDI
depends on DRM_EXYNOS
help
Choose this option if you want to use Exynos VIDI for DRM.

config DRM_EXYNOS_G2D
bool "Exynos DRM G2D"
depends on DRM_EXYNOS
help
Choose this option if you want to use Exynos G2D for DRM.
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/exynos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ exynosdrm-$(CONFIG_DRM_EXYNOS_HDMI) += exynos_hdmi.o exynos_mixer.o \
exynos_ddc.o exynos_hdmiphy.o \
exynos_drm_hdmi.o
exynosdrm-$(CONFIG_DRM_EXYNOS_VIDI) += exynos_drm_vidi.o
exynosdrm-$(CONFIG_DRM_EXYNOS_G2D) += exynos_drm_g2d.o

obj-$(CONFIG_DRM_EXYNOS) += exynosdrm.o
29 changes: 29 additions & 0 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "exynos_drm_plane.h"
#include "exynos_drm_vidi.h"
#include "exynos_drm_dmabuf.h"
#include "exynos_drm_g2d.h"

#define DRIVER_NAME "exynos"
#define DRIVER_DESC "Samsung SoC DRM"
Expand Down Expand Up @@ -148,9 +149,16 @@ static int exynos_drm_unload(struct drm_device *dev)

static int exynos_drm_open(struct drm_device *dev, struct drm_file *file)
{
struct drm_exynos_file_private *file_priv;

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

file_priv = kzalloc(sizeof(*file_priv), GFP_KERNEL);
if (!file_priv)
return -ENOMEM;

drm_prime_init_file_private(&file->prime);
file->driver_priv = file_priv;

return exynos_drm_subdrv_open(dev, file);
}
Expand Down Expand Up @@ -217,6 +225,12 @@ static struct drm_ioctl_desc exynos_ioctls[] = {
DRM_UNLOCKED | DRM_AUTH),
DRM_IOCTL_DEF_DRV(EXYNOS_VIDI_CONNECTION,
vidi_connection_ioctl, DRM_UNLOCKED | DRM_AUTH),
DRM_IOCTL_DEF_DRV(EXYNOS_G2D_GET_VER,
exynos_g2d_get_ver_ioctl, DRM_UNLOCKED | DRM_AUTH),
DRM_IOCTL_DEF_DRV(EXYNOS_G2D_SET_CMDLIST,
exynos_g2d_set_cmdlist_ioctl, DRM_UNLOCKED | DRM_AUTH),
DRM_IOCTL_DEF_DRV(EXYNOS_G2D_EXEC,
exynos_g2d_exec_ioctl, DRM_UNLOCKED | DRM_AUTH),
};

static const struct file_operations exynos_drm_driver_fops = {
Expand Down Expand Up @@ -317,13 +331,24 @@ static int __init exynos_drm_init(void)
goto out_vidi;
#endif

#ifdef CONFIG_DRM_EXYNOS_G2D
ret = platform_driver_register(&g2d_driver);
if (ret < 0)
goto out_g2d;
#endif

ret = platform_driver_register(&exynos_drm_platform_driver);
if (ret < 0)
goto out;

return 0;

out:
#ifdef CONFIG_DRM_EXYNOS_G2D
platform_driver_unregister(&g2d_driver);
out_g2d:
#endif

#ifdef CONFIG_DRM_EXYNOS_VIDI
out_vidi:
platform_driver_unregister(&vidi_driver);
Expand Down Expand Up @@ -351,6 +376,10 @@ static void __exit exynos_drm_exit(void)

platform_driver_unregister(&exynos_drm_platform_driver);

#ifdef CONFIG_DRM_EXYNOS_G2D
platform_driver_unregister(&g2d_driver);
#endif

#ifdef CONFIG_DRM_EXYNOS_HDMI
platform_driver_unregister(&exynos_drm_common_hdmi_driver);
platform_driver_unregister(&mixer_driver);
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,18 @@ struct exynos_drm_manager {
struct exynos_drm_display_ops *display_ops;
};

struct exynos_drm_g2d_private {
struct device *dev;
struct list_head inuse_cmdlist;
struct list_head event_list;
struct list_head gem_list;
unsigned int gem_nr;
};

struct drm_exynos_file_private {
struct exynos_drm_g2d_private *g2d_priv;
};

/*
* Exynos drm private structure.
*/
Expand Down Expand Up @@ -291,4 +303,5 @@ extern struct platform_driver hdmi_driver;
extern struct platform_driver mixer_driver;
extern struct platform_driver exynos_drm_common_hdmi_driver;
extern struct platform_driver vidi_driver;
extern struct platform_driver g2d_driver;
#endif
Loading

0 comments on commit 037a0bd

Please sign in to comment.