[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAtx0c4U70DtMuyV@Gentoo>
Date: Sat, 11 Mar 2023 02:07:13 +0800
From: Jianhua Lu <lujianhua000@...il.com>
To: Thierry Reding <thierry.reding@...il.com>,
Sam Ravnborg <sam@...nborg.org>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Linus Walleij <linus.walleij@...aro.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Neil Armstrong <neil.armstrong@...aro.org>
Cc: dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org
Subject: Re: [PATCH v4 2/2] drm/panel: Add driver for Novatek NT36523
On Fri, Mar 10, 2023 at 09:21:44PM +0800, Jianhua Lu wrote:
> Add a driver for panels using the Novatek NT36523 display driver IC.
...
> +
> +static int nt36523_get_modes(struct drm_panel *panel,
> + struct drm_connector *connector)
> +{
> + struct panel_info *pinfo = to_panel_info(panel);
> + int i;
> +
> + for (i =0; i < pinfo->desc->num_modes; i++) {
s/i =0/i = 0/, I forget to run checkpatch, sorry. I will fix it in v5
> + const struct drm_display_mode *m = &pinfo->desc->modes[i];
> + struct drm_display_mode *mode;
> + mode = drm_mode_duplicate(connector->dev, m);
> + if (!mode) {
> + dev_err(panel->dev, "failed to add mode %ux%u@%u\n",
> + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));
> + return -ENOMEM;
> + }
> + mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> + drm_mode_set_name(mode);
> + drm_mode_probed_add(connector, mode);
> + }
> +
> + connector->display_info.width_mm = pinfo->desc->width_mm;
> + connector->display_info.height_mm = pinfo->desc->height_mm;
> + connector->display_info.bpc = pinfo->desc->bpc;
> +
> + return pinfo->desc->num_modes;
> +}
>
>
Powered by blists - more mailing lists