Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344678
b: refs/heads/master
c: 8dd2491
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed Dec 7, 2012
1 parent 46eff38 commit 9a4e0ec
Show file tree
Hide file tree
Showing 5 changed files with 39 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: 6b6f1edfdb6c41e630e4a70d64a8e8817b3170c2
refs/heads/master: 8dd2491a4216778a81668581041ba1c06453ed6c
33 changes: 32 additions & 1 deletion trunk/drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define DSS_SUBSYS_NAME "APPLY"

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/jiffies.h>
Expand Down Expand Up @@ -131,7 +132,7 @@ static struct mgr_priv_data *get_mgr_priv(struct omap_overlay_manager *mgr)
return &dss_data.mgr_priv_data_array[mgr->id];
}

void dss_apply_init(void)
static void apply_init_priv(void)
{
const int num_ovls = dss_feat_get_num_ovls();
struct mgr_priv_data *mp;
Expand Down Expand Up @@ -1463,3 +1464,33 @@ int dss_ovl_disable(struct omap_overlay *ovl)
return r;
}

static int compat_refcnt;
static DEFINE_MUTEX(compat_init_lock);

int omapdss_compat_init(void)
{
mutex_lock(&compat_init_lock);

if (compat_refcnt++ > 0)
goto out;

apply_init_priv();

out:
mutex_unlock(&compat_init_lock);

return 0;
}
EXPORT_SYMBOL(omapdss_compat_init);

void omapdss_compat_uninit(void)
{
mutex_lock(&compat_init_lock);

if (--compat_refcnt > 0)
goto out;

out:
mutex_unlock(&compat_init_lock);
}
EXPORT_SYMBOL(omapdss_compat_uninit);
4 changes: 3 additions & 1 deletion trunk/drivers/video/omap2/dss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static int __init omap_dss_probe(struct platform_device *pdev)

dss_features_init(omapdss_get_version());

dss_apply_init();
omapdss_compat_init();

dss_init_overlay_managers(pdev);
dss_init_overlays(pdev);
Expand Down Expand Up @@ -264,6 +264,8 @@ static int omap_dss_remove(struct platform_device *pdev)
dss_uninit_overlays(pdev);
dss_uninit_overlay_managers(pdev);

omapdss_compat_uninit();

return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/video/omap2/dss/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ void dss_copy_device_pdata(struct omap_dss_device *dst,
const struct omap_dss_device *src);

/* apply */
void dss_apply_init(void);
int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr);
int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl);
void dss_mgr_start_update(struct omap_overlay_manager *mgr);
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -836,4 +836,7 @@ void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev,
void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev,
struct rfbi_timings *timings);

int omapdss_compat_init(void);
void omapdss_compat_uninit(void);

#endif

0 comments on commit 9a4e0ec

Please sign in to comment.