linux/drivers/gpu/drm
Inki Dae 1c248b7d29 DRM: add DRM Driver for Samsung SoC EXYNOS4210.
This patch is a DRM Driver for Samsung SoC Exynos4210 and now enables
only FIMD yet but we will add HDMI support also in the future.

this patch is based on git repository below:
git://people.freedesktop.org/~airlied/linux.git
branch name: drm-next
commit-id: 88ef4e3f4f

you can refer to our working repository below:
http://git.infradead.org/users/kmpark/linux-2.6-samsung
branch name: samsung-drm

We tried to re-use lowlevel codes of the FIMD driver(s3c-fb.c
based on Linux framebuffer) but couldn't so because lowlevel codes
of s3c-fb.c are included internally and so FIMD module of this driver has
its own lowlevel codes.

We used GEM framework for buffer management and DMA APIs(dma_alloc_*)
for buffer allocation so we can allocate physically continuous memory
for DMA through it and also we could use CMA later if CMA is applied to
mainline.

Refer to this link for CMA(Continuous Memory Allocator):
http://lkml.org/lkml/2011/7/20/45

this driver supports only physically continuous memory(non-iommu).

Links to previous versions of the patchset:
v1: < https://lwn.net/Articles/454380/ >
v2: < http://www.spinics.net/lists/kernel/msg1224275.html >
v3: < http://www.spinics.net/lists/dri-devel/msg13755.html >
v4: < http://permalink.gmane.org/gmane.comp.video.dri.devel/60439 >
v5: < http://comments.gmane.org/gmane.comp.video.dri.devel/60802 >

Changelog v2:
DRM: add DRM_IOCTL_SAMSUNG_GEM_MMAP ioctl command.

    this feature maps user address space to physical memory region
    once user application requests DRM_IOCTL_SAMSUNG_GEM_MMAP ioctl.

DRM: code clean and add exception codes.

Changelog v3:
DRM: Support multiple irq.

    FIMD and HDMI have their own irq handler but DRM Framework can regiter
    only one irq handler this patch supports mutiple irq for Samsung SoC.

DRM: Consider modularization.

    each DRM, FIMD could be built as a module.

DRM: Have indenpendent crtc object.

    crtc isn't specific to SoC Platform so this patch gets a crtc
    to be used as common object.
    created crtc could be attached to any encoder object.

DRM: code clean and add exception codes.

Changelog v4:
DRM: remove is_defult from samsung_fb.

    is_default isn't used for default framebuffer.

DRM: code refactoring to fimd module.
    this patch is be considered with multiple display objects and
    would use its own request_irq() to register a irq handler instead of
    drm framework's one.

DRM: remove find_samsung_drm_gem_object()

DRM: move kernel private data structures and definitions to driver folder.

    samsung_drm.h would contain only public information for userspace
    ioctl interface.

DRM: code refactoring to gem modules.
    buffer module isn't dependent of gem module anymore.

DRM: fixed security issue.

DRM: remove encoder porinter from specific connector.

    samsung connector doesn't need to have generic encoder.

DRM: code clean and add exception codes.

Changelog v5:
DRM: updated fimd(display controller) driver.
    added various pixel formats, color key and pixel blending features.

DRM: removed end_buf_off from samsung_drm_overlay structure.
    this variable isn't used and end buffer address would be
    calculated by each sub driver.

DRM: use generic function for mmap_offset.
    replaced samsung_drm_gem_create_mmap_offset() and
    samsung_drm_free_mmap_offset() with generic ones applied
    to mainline recentrly.

DRM: removed unnecessary codes and added exception codes.

DRM: added comments and code clean.

Changelog v6:
DRM: added default config options.

DRM: added padding for 64-bit align.

DRM: changed prefix 'samsung' to 'exynos'

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-05 10:27:31 +01:00
..
exynos DRM: add DRM Driver for Samsung SoC EXYNOS4210. 2011-10-05 10:27:31 +01:00
i2c
i810 drm: rework PCI/platform driver interface. 2011-02-07 13:09:36 +10:00
i915 Merge branch 'drm-intel-next' of git://people.freedesktop.org/~keithp/linux into drm-next 2011-09-20 09:36:22 +01:00
mga alpha, drm: Remove obsolete Alpha support in MGA DRM code 2011-06-14 09:32:56 +10:00
nouveau Merge branch 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-next 2011-09-20 09:35:22 +01:00
r128 drm: rework PCI/platform driver interface. 2011-02-07 13:09:36 +10:00
radeon Merge branch 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-next 2011-09-20 09:35:22 +01:00
savage savage: remove unnecessary if statement 2011-06-14 09:29:12 +10:00
sis treewide: fix potentially dangerous trailing ';' in #defined values/expressions 2011-07-21 14:10:00 +02:00
tdfx drm: rework PCI/platform driver interface. 2011-02-07 13:09:36 +10:00
ttm ttm: export ttm_bo_create 2011-10-05 10:17:07 +01:00
via drm: rework PCI/platform driver interface. 2011-02-07 13:09:36 +10:00
vmwgfx vmwgfx: Minor cleanups 2011-10-05 10:17:36 +01:00
ati_pcigart.c
drm_agpsupport.c
drm_auth.c
drm_buffer.c
drm_bufs.c drm: Compare only lower 32 bits of framebuffer map offsets 2011-06-14 11:09:54 +10:00
drm_cache.c
drm_context.c
drm_crtc.c drm: Fix the number of connector and encoder to cleanup functions 2011-08-29 11:47:35 +01:00
drm_crtc_helper.c drm: bpp and depth changes require full mode sets 2011-07-07 13:20:49 -07:00
drm_debugfs.c drm/debugfs: Initialise empty variable 2011-08-04 14:38:52 +01:00
drm_dma.c
drm_dp_i2c_helper.c
drm_drv.c drm/core: add ioctl to query device/driver capabilities 2011-03-04 14:47:30 +10:00
drm_edid.c drm: Separate EDID Header Check from EDID Block Check 2011-08-04 14:39:35 +01:00
drm_edid_modes.h drm: Mark constant arrays of drm_display_mode const 2011-02-23 11:13:11 +10:00
drm_encoder_slave.c
drm_fb_helper.c drm: Remove duplicate "return" statement 2011-09-09 09:11:44 +01:00
drm_fops.c
drm_gem.c drm/gem: add functions for mmap offset creation 2011-08-30 11:06:06 +01:00
drm_global.c
drm_hashtab.c drm: Remove unused members from struct drm_open_hash 2011-02-23 11:16:40 +10:00
drm_info.c Merge remote branch 'intel/drm-intel-next' of ../drm-next into drm-core-next 2011-03-14 14:15:13 +10:00
drm_ioc32.c drivers/gpu/drm: use printk_ratelimited instead of printk_ratelimit 2011-06-16 16:32:15 +10:00
drm_ioctl.c drm/vblank: update recently added vbl interface to be more future proof. 2011-03-24 21:28:46 +10:00
drm_irq.c drm: Add NULL check about irq functions 2011-08-04 14:39:21 +01:00
drm_lock.c
drm_memory.c
drm_mm.c drm: mm: fix debug output 2011-05-09 09:14:45 +10:00
drm_modes.c DRM: clean up and document parsing of video= parameter 2011-07-25 12:02:26 +01:00
drm_pci.c drm: populate irq_by_busid-member for pci 2011-06-16 16:26:45 +10:00
drm_platform.c drm: platform multi-device support 2011-07-15 06:52:58 +01:00
drm_proc.c
drm_scatter.c drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible 2011-07-25 20:57:13 -07:00
drm_sman.c GPU DRM: Remove unnecessary casts of void ptr returning alloc function return values 2011-01-19 15:24:49 +01:00
drm_stub.c drm: Create and use drm_err 2011-04-28 14:53:02 +10:00
drm_sysfs.c drm: Hold the mode mutex whilst probing for sysfs status 2011-03-16 11:23:04 +10:00
drm_trace.h
drm_trace_points.c
drm_usb.c drm: add usb framework 2011-02-07 13:09:42 +10:00
drm_vm.c alpha/drm: Cleanup Alpha support in DRM generic code 2011-06-14 09:31:37 +10:00
Kconfig DRM: add DRM Driver for Samsung SoC EXYNOS4210. 2011-10-05 10:27:31 +01:00
Makefile DRM: add DRM Driver for Samsung SoC EXYNOS4210. 2011-10-05 10:27:31 +01:00
README.drm

************************************************************
* For the very latest on DRI development, please see:      *
*     http://dri.freedesktop.org/                          *
************************************************************

The Direct Rendering Manager (drm) is a device-independent kernel-level
device driver that provides support for the XFree86 Direct Rendering
Infrastructure (DRI).

The DRM supports the Direct Rendering Infrastructure (DRI) in four major
ways:

    1. The DRM provides synchronized access to the graphics hardware via
       the use of an optimized two-tiered lock.

    2. The DRM enforces the DRI security policy for access to the graphics
       hardware by only allowing authenticated X11 clients access to
       restricted regions of memory.

    3. The DRM provides a generic DMA engine, complete with multiple
       queues and the ability to detect the need for an OpenGL context
       switch.

    4. The DRM is extensible via the use of small device-specific modules
       that rely extensively on the API exported by the DRM module.


Documentation on the DRI is available from:
    http://dri.freedesktop.org/wiki/Documentation
    http://sourceforge.net/project/showfiles.php?group_id=387
    http://dri.sourceforge.net/doc/

For specific information about kernel-level support, see:

    The Direct Rendering Manager, Kernel Support for the Direct Rendering
    Infrastructure
    http://dri.sourceforge.net/doc/drm_low_level.html

    Hardware Locking for the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/hardware_locking_low_level.html

    A Security Analysis of the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/security_low_level.html