Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294275
b: refs/heads/master
c: cdf88b9
h: refs/heads/master
i:
  294273: 5a84eb4
  294271: 5676b3e
v: v3
  • Loading branch information
Laurent Pinchart committed Mar 12, 2012
1 parent 5fff88b commit d7f4b93
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 39 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: 97d16fe69b6499a14a0c85c053f7bef54ce992a4
refs/heads/master: cdf88b9072a86545611b9c3f5597ebc47e50ffc1
5 changes: 1 addition & 4 deletions trunk/drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,14 +1072,11 @@ static int sh_mobile_fb_pan_display(struct fb_var_screeninfo *var,

if (ch->meram) {
struct sh_mobile_meram_info *mdev;
int ret;

mdev = priv->meram_dev;
ret = mdev->ops->meram_update(mdev, ch->meram,
mdev->ops->meram_update(mdev, ch->meram,
base_addr_y, base_addr_c,
&base_addr_y, &base_addr_c);
if (ret)
return ret;
}

ch->base_addr_y = base_addr_y;
Expand Down
32 changes: 6 additions & 26 deletions trunk/drivers/video/sh_mobile_meram.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,21 +451,15 @@ static void *sh_mobile_meram_register(struct sh_mobile_meram_info *pdata,
unsigned int *pitch)
{
struct sh_mobile_meram_fb_cache *cache;
struct sh_mobile_meram_priv *priv;
struct platform_device *pdev;
struct sh_mobile_meram_priv *priv = pdata->priv;
struct platform_device *pdev = pdata->pdev;
unsigned int out_pitch;

if (!pdata || !pdata->priv || !pdata->pdev || !cfg)
return ERR_PTR(-EINVAL);

if (pixelformat != SH_MOBILE_MERAM_PF_NV &&
pixelformat != SH_MOBILE_MERAM_PF_NV24 &&
pixelformat != SH_MOBILE_MERAM_PF_RGB)
return ERR_PTR(-EINVAL);

priv = pdata->priv;
pdev = pdata->pdev;

dev_dbg(&pdev->dev, "registering %dx%d (%s)", xres, yres,
!pixelformat ? "yuv" : "rgb");

Expand Down Expand Up @@ -500,16 +494,11 @@ static void *sh_mobile_meram_register(struct sh_mobile_meram_info *pdata,
return cache;
}

static int
static void
sh_mobile_meram_unregister(struct sh_mobile_meram_info *pdata, void *data)
{
struct sh_mobile_meram_fb_cache *cache = data;
struct sh_mobile_meram_priv *priv;

if (!pdata || !pdata->priv || !data)
return -EINVAL;

priv = pdata->priv;
struct sh_mobile_meram_priv *priv = pdata->priv;

mutex_lock(&priv->lock);

Expand All @@ -521,31 +510,22 @@ sh_mobile_meram_unregister(struct sh_mobile_meram_info *pdata, void *data)
meram_free(priv, cache);

mutex_unlock(&priv->lock);

return 0;
}

static int
static void
sh_mobile_meram_update(struct sh_mobile_meram_info *pdata, void *data,
unsigned long base_addr_y, unsigned long base_addr_c,
unsigned long *icb_addr_y, unsigned long *icb_addr_c)
{
struct sh_mobile_meram_fb_cache *cache = data;
struct sh_mobile_meram_priv *priv;

if (!pdata || !pdata->priv || !data)
return -EINVAL;

priv = pdata->priv;
struct sh_mobile_meram_priv *priv = pdata->priv;

mutex_lock(&priv->lock);

meram_set_next_addr(priv, cache, base_addr_y, base_addr_c);
meram_get_next_icb_addr(pdata, cache, icb_addr_y, icb_addr_c);

mutex_unlock(&priv->lock);

return 0;
}

static struct sh_mobile_meram_ops sh_mobile_meram_ops = {
Expand Down
15 changes: 7 additions & 8 deletions trunk/include/video/sh_mobile_meram.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,15 @@ struct sh_mobile_meram_ops {
unsigned int *pitch);

/* unregister usage of meram */
int (*meram_unregister)(struct sh_mobile_meram_info *meram_dev,
void *data);
void (*meram_unregister)(struct sh_mobile_meram_info *meram_dev,
void *data);

/* update meram settings */
int (*meram_update)(struct sh_mobile_meram_info *meram_dev,
void *data,
unsigned long base_addr_y,
unsigned long base_addr_c,
unsigned long *icb_addr_y,
unsigned long *icb_addr_c);
void (*meram_update)(struct sh_mobile_meram_info *meram_dev, void *data,
unsigned long base_addr_y,
unsigned long base_addr_c,
unsigned long *icb_addr_y,
unsigned long *icb_addr_c);
};

#endif /* __VIDEO_SH_MOBILE_MERAM_H__ */

0 comments on commit d7f4b93

Please sign in to comment.