SUPERH platform development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 25/57] sh_mobile_lcdc: Add display notify callback to sh_mobile_lcdc_chan
Date: Fri, 16 Dec 2011 10:22:36 +0000	[thread overview]
Message-ID: <201112161122.37825.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <1323784972-24205-26-git-send-email-laurent.pinchart@ideasonboard.com>

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@ideasonboard.com>
> >
> > 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

      parent reply	other threads:[~2011-12-16 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13 14:02 [PATCH 25/57] sh_mobile_lcdc: Add display notify callback to sh_mobile_lcdc_chan Laurent Pinchart
2011-12-16  9:40 ` [PATCH 25/57] sh_mobile_lcdc: Add display notify callback to Guennadi Liakhovetski
2011-12-16 10:22 ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201112161122.37825.laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-fbdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox