mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Philipp Zabel <p.zabel@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH 2/4] video: Add of_get_display_timing
Date: Thu, 30 Mar 2023 10:32:03 +0200	[thread overview]
Message-ID: <ad29e5f4-654a-ce0b-a75d-952b1623fa4e@pengutronix.de> (raw)
In-Reply-To: <20230329105638.1258096-2-p.zabel@pengutronix.de>

On 29.03.23 12:56, Philipp Zabel wrote:
> Add a port of the kernel of_get_display_timing() that writes a
> struct fb_videomode instead of struct display_timing, which we
> don't have.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  drivers/video/of_display_timing.c | 22 ++++++++++++++++++++++
>  include/fb.h                      |  2 ++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
> index 6fe1e1b08b6a..6082d454932d 100644
> --- a/drivers/video/of_display_timing.c
> +++ b/drivers/video/of_display_timing.c
> @@ -98,6 +98,28 @@ static int of_parse_display_timing(const struct device_node *np,
>  	return 0;
>  }
>  
> +/**
> + * of_get_display_timing - parse a display_timing entry
> + * @np: device_node with the timing subnode
> + * @name: name of the timing node
> + * @mode: fb_videomode struct to fill
> + **/
> +int of_get_display_timing(const struct device_node *np, const char *name,
> +			  struct fb_videomode *mode)
> +{
> +	struct device_node *timing_np;
> +
> +	if (!np)
> +		return -EINVAL;
> +
> +	timing_np = of_get_child_by_name(np, name);
> +	if (!timing_np)
> +		return -ENOENT;
> +
> +	return of_parse_display_timing(timing_np, mode);
> +}
> +EXPORT_SYMBOL_GPL(of_get_display_timing);
> +
>  /**
>   * of_get_display_timings - parse all display_timing entries from a device_node
>   * @np: device_node with the subnodes
> diff --git a/include/fb.h b/include/fb.h
> index bf5f688342fd..15bb74b99576 100644
> --- a/include/fb.h
> +++ b/include/fb.h
> @@ -147,6 +147,8 @@ struct fb_info {
>  	int shadowfb;
>  };
>  
> +int of_get_display_timing(const struct device_node *np, const char *name,
> +			  struct fb_videomode *mode);
>  struct display_timings *of_get_display_timings(struct device_node *np);
>  void display_timings_release(struct display_timings *);
>  

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2023-03-30  8:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 10:56 [PATCH 1/4] firmware: Add request/release_firmware() calls Philipp Zabel
2023-03-29 10:56 ` [PATCH 2/4] video: Add of_get_display_timing Philipp Zabel
2023-03-30  8:32   ` Ahmad Fatoum [this message]
2023-03-29 10:56 ` [PATCH 3/4] video: add MIPI DBI framebuffer helpers Philipp Zabel
2023-03-30  8:43   ` Ahmad Fatoum
2023-03-30 12:02     ` Philipp Zabel
2023-03-29 10:56 ` [PATCH 4/4] video: Add MIPI DBI compatible SPI driver Philipp Zabel
2023-03-30  8:56   ` Ahmad Fatoum
2023-03-30  8:30 ` [PATCH 1/4] firmware: Add request/release_firmware() calls Ahmad Fatoum

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=ad29e5f4-654a-ce0b-a75d-952b1623fa4e@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=p.zabel@pengutronix.de \
    /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