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] [day] [month] [year] [list]
Message-ID: <BN1PR0301MB060987F8F09E3ABD7F534C5A9B7A0@BN1PR0301MB0609.namprd03.prod.outlook.com>
Date:	Tue, 2 Dec 2014 07:55:27 +0000
From:	"Li.Xiubo@...escale.com" <Li.Xiubo@...escale.com>
To:	Alexander Stein <alexander.stein@...tec-electronic.com>
CC:	"plagnioj@...osoft.com" <plagnioj@...osoft.com>,
	"tomi.valkeinen@...com" <tomi.valkeinen@...com>,
	"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
	"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/4] video: fsl-dcfb: Add dcfb framebuffer driver for
 LS1021A platform

Hi Alexander,

Thanks very much for your comments.

> 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).
> 

Yes, right. So in the next version, I will try to enhance this. 

Thanks,

BRs
Xiubo

> 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@...tec-electronic.com
> Website: www.systec-electronic.com
> 
> Managing Director: Dipl.-Phys. Siegmar Schmidt
> Commercial registry: Amtsgericht Chemnitz, HRB 28082

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ