Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251019
b: refs/heads/master
c: 7a0987b
h: refs/heads/master
i:
  251017: c5611d8
  251015: a9322e1
v: v3
  • Loading branch information
Jani Nikula authored and Tomi Valkeinen committed May 11, 2011
1 parent 9e8b75a commit 5f47bfd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 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: b4de838e9ff17695c462e6532a347746c446d10a
refs/heads/master: 7a0987bf2cf2683901d0cd7f1504023da2584c5f
12 changes: 10 additions & 2 deletions trunk/drivers/video/omap2/omapfb/omapfb-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,16 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)

p.display_info.xres = xres;
p.display_info.yres = yres;
p.display_info.width = 0;
p.display_info.height = 0;

if (display->driver->get_dimensions) {
u32 w, h;
display->driver->get_dimensions(display, &w, &h);
p.display_info.width = w;
p.display_info.height = h;
} else {
p.display_info.width = 0;
p.display_info.height = 0;
}

if (copy_to_user((void __user *)arg, &p.display_info,
sizeof(p.display_info)))
Expand Down
12 changes: 10 additions & 2 deletions trunk/drivers/video/omap2/omapfb/omapfb-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,16 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)
var->xres, var->yres,
var->xres_virtual, var->yres_virtual);

var->height = -1;
var->width = -1;
if (display && display->driver->get_dimensions) {
u32 w, h;
display->driver->get_dimensions(display, &w, &h);
var->width = DIV_ROUND_CLOSEST(w, 1000);
var->height = DIV_ROUND_CLOSEST(h, 1000);
} else {
var->height = -1;
var->width = -1;
}

var->grayscale = 0;

if (display && display->driver->get_timings) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ struct omap_dss_driver {

void (*get_resolution)(struct omap_dss_device *dssdev,
u16 *xres, u16 *yres);
void (*get_dimensions)(struct omap_dss_device *dssdev,
u32 *width, u32 *height);
int (*get_recommended_bpp)(struct omap_dss_device *dssdev);

int (*check_timings)(struct omap_dss_device *dssdev,
Expand Down

0 comments on commit 5f47bfd

Please sign in to comment.