Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337467
b: refs/heads/master
c: 5e3b087
h: refs/heads/master
i:
  337465: 4248619
  337463: d627e6c
v: v3
  • Loading branch information
Rob Clark authored and Greg Kroah-Hartman committed Oct 30, 2012
1 parent 03567a9 commit f7440af
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f68f5f20675a30197423cf79b42fd4f05b77af43
refs/heads/master: 5e3b08749951e5746d3e747f1ffae37eff2d08d5
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-omap2/drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/platform_data/omap_drm.h>

#include <plat/omap_device.h>
#include <plat/omap_hwmod.h>
#include <plat/cpu.h>

#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE)

static struct omap_drm_platform_data platform_data;

static struct platform_device omap_drm_device = {
.dev = {
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &platform_data,
},
.name = "omapdrm",
.id = 0,
Expand All @@ -52,6 +57,8 @@ static int __init omap_init_drm(void)
oh->name);
}

platform_data.omaprev = GET_OMAP_REVISION();

return platform_device_register(&omap_drm_device);

}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/omapdrm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
config DRM_OMAP
tristate "OMAP DRM"
depends on DRM && !CONFIG_FB_OMAP2
depends on ARCH_OMAP2PLUS
depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
select DRM_KMS_HELPER
select OMAP2_DSS
select FB_SYS_FILLRECT
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/omapdrm/omap_dmm_tiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef OMAP_DMM_TILER_H
#define OMAP_DMM_TILER_H

#include <plat/cpu.h>
#include "omap_drv.h"
#include "tcm.h"

Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/staging/omapdrm/omap_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,14 @@ static void omap_modeset_free(struct drm_device *dev)
static int ioctl_get_param(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
struct omap_drm_private *priv = dev->dev_private;
struct drm_omap_param *args = data;

DBG("%p: param=%llu", dev, args->param);

switch (args->param) {
case OMAP_PARAM_CHIPSET_ID:
args->value = GET_OMAP_TYPE;
args->value = priv->omaprev;
break;
default:
DBG("unknown parameter %lld", args->param);
Expand Down Expand Up @@ -555,6 +556,7 @@ struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = {
*/
static int dev_load(struct drm_device *dev, unsigned long flags)
{
struct omap_drm_platform_data *pdata = dev->dev->platform_data;
struct omap_drm_private *priv;
int ret;

Expand All @@ -566,6 +568,8 @@ static int dev_load(struct drm_device *dev, unsigned long flags)
return -ENOMEM;
}

priv->omaprev = pdata->omaprev;

dev->dev_private = priv;

priv->wq = alloc_ordered_workqueue("omapdrm", 0);
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/staging/omapdrm/omap_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#define MAX_MAPPERS 2

struct omap_drm_private {
uint32_t omaprev;

unsigned int num_crtcs;
struct drm_crtc *crtcs[8];

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/platform_data/omap_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct omap_kms_platform_data {
};

struct omap_drm_platform_data {
uint32_t omaprev;
struct omap_kms_platform_data *kms_pdata;
};

Expand Down

0 comments on commit f7440af

Please sign in to comment.