lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180710105743.GK1504@ulmo>
Date:   Tue, 10 Jul 2018 12:57:43 +0200
From:   Thierry Reding <thierry.reding@...il.com>
To:     Heiko Stuebner <heiko@...ech.de>
Cc:     robh+dt@...nel.org, mark.rutland@....com,
        dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, seanpaul@...omium.org,
        briannorris@...omium.org, hl@...k-chips.com,
        emil.l.velikov@...il.com
Subject: Re: [PATCH v5 1/4] drm/panel: p079zca: refactor panel driver to
 support multiple panels

On Mon, Jul 02, 2018 at 12:27:18PM +0200, Heiko Stuebner wrote:
> From: huang lin <hl@...k-chips.com>
> 
> Refactor Innolux P079ZCA panel driver, let it support
> multi panels from Innolux that share similar power sequences.
> 
> Panels may require different power supplies so use regulator bulk
> interfaces and define per panel supply-names.
> 
> Changes in v2:
> - Change regulator property name to meet the panel datasheet
> Changes in v3:
> - this patch only refactor P079ZCA panel to support multi panel,
>   support P097PFG panel in another patch
> Changes in v4:
> - Modify the patch which suggest by Thierry
> Changes in v5:
> - use regulator_bulk to handle different supply number
> 
> Signed-off-by: Lin Huang <hl@...k-chips.com>
> Signed-off-by: Heiko Stuebner <heiko@...ech.de>
> ---
>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 143 ++++++++++++------
>  1 file changed, 100 insertions(+), 43 deletions(-)

Applied with minor changes, see below.

> diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> index bb53e0850764..840ad4a6a6a6 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> @@ -20,12 +20,29 @@
>  
>  #include <video/mipi_display.h>
>  
> +struct panel_desc {
> +	const struct drm_display_mode *modes;

I renamed this to "mode" because there is always only one.

> +	unsigned int bpc;
> +	struct {
> +		unsigned int width;
> +		unsigned int height;
> +	} size;
> +
> +	unsigned long flags;
> +	enum mipi_dsi_pixel_format format;
> +	unsigned int lanes;
> +	const char * const *supply_names;
> +	unsigned int num_supplies;
> +};
> +
>  struct innolux_panel {
>  	struct drm_panel base;
>  	struct mipi_dsi_device *link;
> +	const struct panel_desc *desc;
>  
>  	struct backlight_device *backlight;
> -	struct regulator *supply;
> +	struct regulator_bulk_data *supplies;
> +	unsigned int num_supplies;
>  	struct gpio_desc *enable_gpio;
>  
>  	bool prepared;
> @@ -77,9 +94,7 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
>  	/* T8: 80ms - 1000ms */
>  	msleep(80);
>  
> -	err = regulator_disable(innolux->supply);
> -	if (err < 0)
> -		return err;
> +	regulator_bulk_disable(innolux->desc->num_supplies, innolux->supplies);

I kept the error check and return here.

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ