From: alexander.stein@systec-electronic.com (Alexander Stein)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] video: fsl-dcfb: Add dcfb framebuffer driver for LS1021A platform
Date: Mon, 01 Dec 2014 14:29:23 +0100 [thread overview]
Message-ID: <1645594.e2cfs6JOiv@ws-stein> (raw)
In-Reply-To: <1416824454-28156-2-git-send-email-Li.Xiubo@freescale.com>
On Monday 24 November 2014 18:20:51, Xiubo Li wrote:
> [...]
> +static int fsl_dcfb_init_fbinfo(struct fb_info *info)
> +{
> + struct fsl_dcfb_mfb_info *mfbi = info->par;
> + struct fb_var_screeninfo *var = &info->var;
> + struct fsl_dcfb_fb_private *dcfb = mfbi->parent;
> + struct device_node *np = dcfb->dev->of_node;
> + struct device_node *dnp, *tnp;
> + struct display_timings *timings;
> + int i, ret;
> +
> + dnp = of_parse_phandle(np, "display", 0);
> + if (!dnp) {
> + dev_err(dcfb->dev, "failed to find \"display\" phandle.\n");
> + return -ENODEV;
> + }
> +
> + ret = of_property_read_u32(dnp, "bits-per-pixel",
> + &var->bits_per_pixel);
> + if (ret < 0) {
> + dev_err(dcfb->dev, "failed to get \"bits-per-pixel\" property.\n");
> + goto put_dnp;
> + }
> +
> + timings = of_get_display_timings(dnp);
> + if (!timings) {
> + dev_err(dcfb->dev, "failed to get display timings\n");
> + return -ENODEV;
> + goto put_dnp;
> + }
> +
> + tnp = of_find_node_by_name(dnp, "display-timings");
> + if (!tnp) {
> + dev_err(dcfb->dev, "failed to find \"display-timings\" node\n");
> + return -ENODEV;
> + goto put_dnp;
> + }
> +
> + for (i = 0; i < of_get_child_count(tnp); i++) {
> + struct videomode vm;
> + struct fb_videomode fb_vm;
> +
> + ret = videomode_from_timings(timings, &vm, i);
> + if (ret < 0)
> + goto put_tnp;
> +
> + ret = fb_videomode_from_videomode(&vm, &fb_vm);
> + if (ret < 0)
> + goto put_tnp;
> +
> + fb_add_videomode(&fb_vm, &info->modelist);
> + }
Adding each display timing to the modelist here...
> [...]
> + ret = fsl_dcfb_init_fbinfo(info);
> + if (ret)
> + goto err_cmap;
> +
> + modelist = list_first_entry(&info->modelist,
> + struct fb_modelist, list);
> + fb_videomode_to_var(&info->var, &modelist->mode);
... and just picking the first here, essentially renders the "native-mode" property in device tree as useless, since only the first in that list is picked (which seems to be the last one inserted).
Best regards,
Alexander
--
Dipl.-Inf. Alexander Stein
SYS TEC electronic GmbH
Am Windrad 2
08468 Heinsdorfergrund
Tel.: 03765 38600-1156
Fax: 03765 38600-4100
Email: alexander.stein at systec-electronic.com
Website: www.systec-electronic.com
Managing Director: Dipl.-Phys. Siegmar Schmidt
Commercial registry: Amtsgericht Chemnitz, HRB 28082
next prev parent reply other threads:[~2014-12-01 13:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 10:20 [PATCH 0/4] LS1021A: Add dcfb framebuffer driver support Xiubo Li
2014-11-24 10:20 ` [PATCH 1/4] video: fsl-dcfb: Add dcfb framebuffer driver for LS1021A platform Xiubo Li
2014-12-01 13:29 ` Alexander Stein [this message]
2014-12-02 7:55 ` Li.Xiubo at freescale.com
2014-11-24 10:20 ` [PATCH 2/4] video: fsl-dcfb: Add devicetree binding support Xiubo Li
2014-11-24 10:20 ` [PATCH 3/4] ARM: ls1021a: dtsi: Add dt node support for dcfb Xiubo Li
2014-11-24 10:20 ` [PATCH 4/4] ARM: ls1021a: dts: Add and enable dt node " Xiubo Li
2014-12-01 2:38 ` [PATCH 0/4] LS1021A: Add dcfb framebuffer driver support Li.Xiubo at freescale.com
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=1645594.e2cfs6JOiv@ws-stein \
--to=alexander.stein@systec-electronic.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).