Hi Guennadi, On Friday 16 December 2011 10:40:48 Guennadi Liakhovetski wrote: > On Tue, 13 Dec 2011, Laurent Pinchart wrote: > > The callback implements 3 notification events: > > > > - SH_MOBILE_LCDC_EVENT_DISPLAY_CONNECT notifies the LCDC that the > > display has been connected > > > > - SH_MOBILE_LCDC_EVENT_DISPLAY_DISCONNECT notifies the LCDC that the > > display has been disconnected > > > > - SH_MOBILE_LCDC_EVENT_DISPLAY_MODE notifies that LCDC that a display > > mode has been detected > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> > > > > diff --git a/drivers/video/sh_mobile_lcdcfb.c > > b/drivers/video/sh_mobile_lcdcfb.c index 4b03aa5..21e5f10 100644 > > --- a/drivers/video/sh_mobile_lcdcfb.c > > +++ b/drivers/video/sh_mobile_lcdcfb.c > > @@ -363,6 +363,86 @@ static void sh_mobile_lcdc_display_off(struct [snip] > > +static int sh_mobile_lcdc_display_notify(struct sh_mobile_lcdc_chan *ch, > > + enum sh_mobile_lcdc_entity_event event, > > + struct fb_var_screeninfo *var) > > +{ > > + struct fb_info *info = ch->info; > > + int ret = 0; > > + > > + switch (event) { > > + case SH_MOBILE_LCDC_EVENT_DISPLAY_CONNECT: > > + /* HDMI plug in */ > > + if (lock_fb_info(info)) { > > + console_lock(); > > + > > + if (!sh_mobile_lcdc_must_reconfigure(ch, var) && > > + info->state == FBINFO_STATE_RUNNING) { > > + /* First activation with the default monitor. > > + * Just turn on, if we run a resume here, the > > + * logo disappears. > > + */ > > + info->var.width = var->width; > > + info->var.height = var->height; > > + sh_mobile_lcdc_display_on(ch); > > + } else { > > + /* New monitor or have to wake up */ > > + fb_set_suspend(info, 0); > > + } > > + > > + console_unlock(); > > + unlock_fb_info(info); > > + } > > + break; > > + > > + case SH_MOBILE_LCDC_EVENT_DISPLAY_DISCONNECT: > > + /* HDMI disconnect */ > > + if (lock_fb_info(info)) { > > + console_lock(); > > + fb_set_suspend(info, 1); > > + console_unlock(); > > + unlock_fb_info(info); > > + } > > + break; > > + > > + case SH_MOBILE_LCDC_EVENT_DISPLAY_MODE: > > + /* Validate a proposed new mode */ > > + var->bits_per_pixel = info->var.bits_per_pixel; > > + ret = info->fbops->fb_check_var(var, info); > > You can call sh_mobile_lcdc_check_var() directly here too, right? This was a way to avoid a forward declaration. You would prefer a forward declaration, right ? :-) I think you would be right. > > + break; > > + } > > + > > + return ret; > > +} > > + -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html