Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321083
b: refs/heads/master
c: 6c6f510
h: refs/heads/master
i:
  321081: 5a7b5f0
  321079: b5f101a
v: v3
  • Loading branch information
Archit Taneja committed Jun 29, 2012
1 parent 6cb4dc8 commit 6a8915d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 38 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: c47cdb3088581f9d744b03399e8b4e89a56a111b
refs/heads/master: 6c6f510afb86e3c77c351dfa20cbb8ca834abad9
2 changes: 1 addition & 1 deletion trunk/drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static void dss_ovl_write_regs(struct omap_overlay *ovl)

mp = get_mgr_priv(ovl->manager);

replication = dss_use_replication(ovl->manager->device, oi->color_mode);
replication = dss_ovl_use_replication(mp->lcd_config, oi->color_mode);

r = dispc_ovl_setup(ovl->id, oi, replication, &mp->timings);
if (r) {
Expand Down
34 changes: 0 additions & 34 deletions trunk/drivers/video/omap2/dss/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,40 +316,6 @@ void omapdss_default_get_timings(struct omap_dss_device *dssdev,
}
EXPORT_SYMBOL(omapdss_default_get_timings);

/* Checks if replication logic should be used. Only use for active matrix,
* when overlay is in RGB12U or RGB16 mode, and LCD interface is
* 18bpp or 24bpp */
bool dss_use_replication(struct omap_dss_device *dssdev,
enum omap_color_mode mode)
{
int bpp;

if (mode != OMAP_DSS_COLOR_RGB12U && mode != OMAP_DSS_COLOR_RGB16)
return false;

switch (dssdev->type) {
case OMAP_DISPLAY_TYPE_DPI:
bpp = dssdev->phy.dpi.data_lines;
break;
case OMAP_DISPLAY_TYPE_HDMI:
case OMAP_DISPLAY_TYPE_VENC:
case OMAP_DISPLAY_TYPE_SDI:
bpp = 24;
break;
case OMAP_DISPLAY_TYPE_DBI:
bpp = dssdev->ctrl.pixel_size;
break;
case OMAP_DISPLAY_TYPE_DSI:
bpp = dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt);
break;
default:
BUG();
return false;
}

return bpp > 16;
}

void dss_init_device(struct platform_device *pdev,
struct omap_dss_device *dssdev)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/video/omap2/dss/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ void dss_init_device(struct platform_device *pdev,
struct omap_dss_device *dssdev);
void dss_uninit_device(struct platform_device *pdev,
struct omap_dss_device *dssdev);
bool dss_use_replication(struct omap_dss_device *dssdev,
enum omap_color_mode mode);

/* manager */
int dss_init_overlay_managers(struct platform_device *pdev);
Expand Down Expand Up @@ -265,6 +263,8 @@ int dss_ovl_simple_check(struct omap_overlay *ovl,
const struct omap_overlay_info *info);
int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info,
const struct omap_video_timings *mgr_timings);
bool dss_ovl_use_replication(struct dss_lcd_mgr_config config,
enum omap_color_mode mode);

/* DSS */
int dss_init_platform_driver(void) __init;
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/video/omap2/dss/overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,3 +687,16 @@ int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info,

return 0;
}

/*
* Checks if replication logic should be used. Only use when overlay is in
* RGB12U or RGB16 mode, and video port width interface is 18bpp or 24bpp
*/
bool dss_ovl_use_replication(struct dss_lcd_mgr_config config,
enum omap_color_mode mode)
{
if (mode != OMAP_DSS_COLOR_RGB12U && mode != OMAP_DSS_COLOR_RGB16)
return false;

return config.video_port_width > 16;
}

0 comments on commit 6a8915d

Please sign in to comment.