Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* Re: [PATCH v11 0/8] PHY framework
From: Kishon Vijay Abraham I @ 2013-09-03 15:37 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130827192059.GZ3005@radagast>

Hi Greg,

On Wednesday 28 August 2013 12:50 AM, Felipe Balbi wrote:
> Hi,
> 
> On Mon, Aug 26, 2013 at 01:44:49PM +0530, Kishon Vijay Abraham I wrote:
>> On Wednesday 21 August 2013 11:16 AM, Kishon Vijay Abraham I wrote:
>>> Added a generic PHY framework that provides a set of APIs for the PHY drivers
>>> to create/destroy a PHY and APIs for the PHY users to obtain a reference to
>>> the PHY with or without using phandle.
>>>
>>> This framework will be of use only to devices that uses external PHY (PHY
>>> functionality is not embedded within the controller).
>>>
>>> The intention of creating this framework is to bring the phy drivers spread
>>> all over the Linux kernel to drivers/phy to increase code re-use and to
>>> increase code maintainability.
>>>
>>> Comments to make PHY as bus wasn't done because PHY devices can be part of
>>> other bus and making a same device attached to multiple bus leads to bad
>>> design.
>>>
>>> If the PHY driver has to send notification on connect/disconnect, the PHY
>>> driver should make use of the extcon framework. Using this susbsystem
>>> to use extcon framwork will have to be analysed.
>>>
>>> You can find this patch series @
>>> git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git testing
>>
>> Looks like there are not further comments on this series. Can you take this in
>> your misc tree?
> 
> Do you want me to queue these for you ? There are quite a few users for
> this framework already and I know of at least 2 others which will show
> up for v3.13.

Can you queue this patch series? There are quite a few users already for this
framework.

Thanks
Kishon

^ permalink raw reply

* Re: [RFC 00/22] OMAPDSS: DT support
From: Laurent Pinchart @ 2013-09-03 10:56 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, devicetree, Archit Taneja,
	Nishanth Menon, Felipe Balbi, Santosh Shilimkar, Tony Lindgren
In-Reply-To: <5224458F.9070401@ti.com>

[-- Attachment #1: Type: text/plain, Size: 7541 bytes --]

Hi Tomi,

On Monday 02 September 2013 11:00:15 Tomi Valkeinen wrote:
> On 22/08/13 00:07, Laurent Pinchart wrote:
> 
> Thanks for the comments!

You're welcome.

> >> The exception to the above are DSI and DBI. DSI and DBI are combined
> >> control and video busses, but the use of the busses for control purposes
> >> is not independent of the video stream. Also, the the busses are, in
> >> practice, one-to-one links. And last, DSI and DBI display entities are
> >> often also controllable via, say, i2c. For these reasons there is no
> >> real Linux bus for DSI and DBI and thus the DSI and DBI devices are
> >> either platform devices or i2c devices.
> > 
> > That's something I'm less convinced about, but I don't have a too strong
> > feeling. The best implementation should get to mainline, I won't nack this
> > architecture just for theoretical reasons.
> 
> Ok. I posted a response to your DBI bus patch about the issues I see.

I'll reply in that mail thread then.

> >> DSI Module ID
> >> =============
> >> 
> >> On OMAP4 we have two DSI modules. To configure the clock routing and pin
> >> muxing, we need to know the hardware module ID for the DSI device, i.e.
> >> is this Linux platform device DSI1 or DSI2. The same issue exists with
> >> other SoCs with multiple outputs of the same kind.
> >> 
> >> With non-DT case, we used the platform device's ID directly. With DT,
> >> that doesn't work. I don't currently have a good solution for this, so as
> >> a temporary solution the DSI driver contains a table, from which it can
> >> find the HW module ID by using the device's base address.
> > 
> > You could add two output ports to the DSS, one for each DSI, and link the
> > DSI modules to the DSS output ports in DT. That would represent the
> > hardware topology, and would allow the DSI driver to know its ID based on
> > the DSS output port it's connected to. It's still a bit hackish in the
> > sense that the DSI driver will use information provided by the DSS (the
> > output port number), but not more than the current method.
> 
> Hmm, yep. That's kind of the same as having an explicit 'module-id'
> property in the DSI node. I had implemented that solution at some point,
> but considered it too ugly. But I agree that deducing the module-id from
> the DSS output port is a bit cleaner, as it doesn't need any special
> properties. And it's maybe also better than the address table I have
> now, as the address table requires special code for each SoC.
> 
> I have to try the V4L2 ports to understand fully how to use them.

Feel free to ask questions :-)

> In the end, I hope to get rid of the module-id totally. It's really not
> a DSI-thing at all. The DSI hardware does not use the module-id for
> anything, it's more about how the DSI module is glued in the DSS/SoC.
> 
> >> I have some ideas how to deduce the DSS version by poking to certain DSS
> >> registers, but it is not yet tested so I don't know if it will work.
> > 
> > That might be a stupid question, but can't you just encode the version in
> > the compatible string of the DSS DT node (the one currently compatible
> > with "ti,omap[34]-dss") ?
> 
> That would require having separate DT files for each revision. For
> example, we have Beagle boards with different OMAP reversions.
> 
> It's fine to have the version encoded in the compatible string for major
> versions, but having all minor revisions encoded there could result in a
> mess.

Obviously if you can detect the version at runtime that would be best. Let's 
see if that can be done and then decide on what solution to implement.

> > Version information might also need to be split/duplicated in several of
> > the DSS DT nodes. A quick grep through the driver source code shows that
> > the version is used by the submodules to infer SoC glue information. For
> > instance dsi_get_channel() uses the version to find the DSI module
> > channel ID. That information could possibly be retrieved from the links
> > between the DSS DT nodes.
> 
> Hmm, yes. Well. The DISPC has multiple output channels: LCD, LCD2, LCD3,
> TV (depending on the SoC). These outputs go to encoders, and the routing
> can be configured. If we consider only DSI encoders on OMAP4, the LCD2
> output can be configured to go to DSI1 or DSI2 modules. LCD1 output can
> be configured to go to DSI1 (but not to DSI2).
> 
> Because the routing has restrictions like mentioned above, it's somewhat
> difficult to allocate the DISPC output channels during runtime in a
> totally dynamic manner. Say, if we happened to allocate LCD2 for DSI1,
> and later we'd want to use DSI2, there would be no DISPC output to use.
> 
> That's why we currently have them hardcoded in the driver, and it works
> ok in all the use cases we have now. However, some board could need to
> setup the channels in some other way for some particular use case.
> 
> So, I'm not totally comfortable with hardcoding the DISPC output - DSS
> encoder connections in the DT data. While it'd work for most cases, it
> doesn't work for all.

Encoding them in the device tree, in the driver(s), or computing them at 
runtime in the kernel are all suboptimal solutions. If the connections are 
configurable we want to expose that to userspace and let userspace configure 
the device. That's not possible yet due to API limitations, so we need to 
handle the situation on the kernel side. I'm thus fine with hardcoding this in 
the driver for now, DT should not encode more than possible connections, it 
shouldn't cary the default configuration.

> Then again, if the connections in the DT data would be considered more
> like a default set of connections, and they could be changed later from
> the kernel/userspace, then it'd be fine.
> 
> >> Some of the DSS modules are actually a combination of multiple smaller
> >> modules. For example, the DSI module contains DSI protocol, DSI PHY and
> >> DSI PLL modules, each in their own address space. These could perhaps be
> >> presented as separate DT nodes and Linux devices, but I am not sure if
> >> that is a good approach or not.
> > 
> > What are the chances that one of those block will be upgraded and/or
> > replaced independently of the others in the future (I know it's a tricky
> > question) ? It might not be worth it going to a too fine-grained approach
> > at the moment, but we need to make sure that the DT bindings will allow
> > an easy path forward if needed.
> 
> For DSI, I believe the chances are quite small. But for HDMI, we already
> have this case for OMAP4 and OMAP5, and we're currently working on
> splitting the HDMI core, PHY and PLL properly. I think it makes sense to
> do the same for DSI also at the same time, especially as the PLL for DSI
> and HDMI is the same (afaik).

Yes, then it's a good idea.

> >> If we shouldn't add the bindings as unstable, when should the bindings be
> >> added? Wait until CDF is in the mainline, and use that?
> > 
> > What about using the CDF bindings, without waiting for CDF to be in
> > mainline ? I believe the bindings should be upstreamed as unstable to
> > start with anyway.
>
> Yes, I think that makes sense. And that's what I've been aiming at. I'm
> just missing the ports-stuff.
> 
> Then again, I see opinions that the old bindings should be supported (e.g.
> the mails with Tony in this same thread). If so, using CDF bindings without
> CDF being in the mainline is a bit risky, as the bindings could well change.

But it's less risky than using custom bindings, isn't it ? :-)

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* RE: [PATCH v3 0/5] ARM: vf610: Add DCU framebuffer driver for Vybrid VF610 platform
From: Wang Huan-B18965 @ 2013-09-03  8:21 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <81BA6E5E0BC2344391CABCEE22D1B6D83F448E@039-SN1MPN1-002.039d.mgd.msft.net>

SGksIEplYW4tQ2hyaXN0b3BoZSwgVG9taSwNCg0KICAgICAgQ291bGQgeW91IHBsZWFzZSBoZWxw
IHRvIHJldmlldyB0aGVzZSBwYXRjaGVzPw0KICAgICAgVGhhbmtzIQ0KDQoNCkJlc3QgUmVnYXJk
cywNCkFsaXNvbiBXYW5nDQoNCj4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gRENVIGFuZCBUQ09OIGRldmljZXMNCj4gPiAgICAgICBBUk06IGNsazogdmY2
MTA6IEFkZCBEQ1UgYW5kIFRDT04gY2xvY2sgc3VwcG9ydA0KPiA+ICAgICAgIGZiOiBBZGQgRENV
IGZyYW1lYnVmZmVyIGRyaXZlciBmb3IgVnlicmlkIFZGNjEwIHBsYXRmb3JtDQo+ID4gICAgICAg
RG9jdW1lbnRhdGlvbjogRFQ6IEFkZCBEQ1UgZnJhbWVidWZmZXIgZHJpdmVyDQo+ID4NCj4gPiAg
RG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL2ZiL2ZzbC1kY3UtZmIudHh0IHwgICA2
NyArKysrKw0KPiA+ICBhcmNoL2FybS9ib290L2R0cy92ZjYxMC10d3IuZHRzICAgICAgICAgICAg
ICAgICAgICAgfCAgIDMyICsrKw0KPiA+ICBhcmNoL2FybS9ib290L2R0cy92ZjYxMC5kdHNpICAg
ICAgICAgICAgICAgICAgICAgICAgfCAgIDE5ICstDQo+ID4gIGFyY2gvYXJtL21hY2gtaW14L2Ns
ay12ZjYxMC5jICAgICAgICAgICAgICAgICAgICAgICB8ICAgIDUgKw0KPiA+ICBkcml2ZXJzL3Zp
ZGVvL0tjb25maWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgIDEwICsNCj4gPiAg
ZHJpdmVycy92aWRlby9NYWtlZmlsZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAg
MSArDQo+ID4gIGRyaXZlcnMvdmlkZW8vZnNsLWRjdS1mYi5jICAgICAgICAgICAgICAgICAgICAg
ICAgICB8IDEwOTUNCj4gPg0KPiArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKw0KPiA+ICsrKysrKysrKw0KPiA+ICBp
bmNsdWRlL2R0LWJpbmRpbmdzL2Nsb2NrL3ZmNjEwLWNsb2NrLmggICAgICAgICAgICAgfCAgICAz
ICstDQo+ID4gIDggZmlsZXMgY2hhbmdlZCwgMTIzMCBpbnNlcnRpb25zKCspLCAyIGRlbGV0aW9u
cygtKSAgY3JlYXRlIG1vZGUNCj4gPiAxMDA2NDQgRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2Jp
bmRpbmdzL2ZiL2ZzbC1kY3UtZmIudHh0DQo+ID4gIGNyZWF0ZSBtb2RlIDEwMDY0NCBkcml2ZXJz
L3ZpZGVvL2ZzbC1kY3UtZmIuYw0KPiA+DQo+ID4NCj4gPg0KPiA+IF9fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQo+ID4gbGludXgtYXJtLWtlcm5lbCBtYWls
aW5nIGxpc3QNCj4gPiBsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcNCj4gPiBo
dHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xpbnV4LWFybS1rZXJu
ZWwNCj4gDQo+IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
DQo+IGxpbnV4LWFybS1rZXJuZWwgbWFpbGluZyBsaXN0DQo+IGxpbnV4LWFybS1rZXJuZWxAbGlz
dHMuaW5mcmFkZWFkLm9yZw0KPiBodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xp
c3RpbmZvL2xpbnV4LWFybS1rZXJuZWwNCg0K


^ permalink raw reply

* Hallo..........
From: Mutoni Williams @ 2013-09-02 15:33 UTC (permalink / raw)



Hello,How are you,I hope you're well,my name is Mutoni,I'm medium height and fair in complexion,i love,caring and I decided to contact you.I really want to have a good relationship with you.Next I have a special something I want to discuss with you,and tell you more about my self.Hope hear from you soon.I know age will not be a bearier to our relationship,I will give my best. Yours,Miss.Mutoni.
 
Hallo,Wie geht es dir,ich hoffe,du bist gut,mein Name ist Mutoni, ich mittlerer Höhe und Messe in Teint bin,ich liebe,fürsorgliche und ich beschlossen,you.I kontaktieren wirklich wollen,eine gute Beziehung mit Ihnen haben.Weiter habe ich eine besondere etwas möchte ich mit Ihnen zu besprechen haben,und erfahren Sie mehr über meine self.Hope von Ihnen zu hören soon.i wissen Alter wird kein bearier,unsere Beziehung zu sein, werde ich mein Bestes geben.Yours,Miss.Mutoni.

^ permalink raw reply

* Re: [PATCH] video: xilinxfb: use devm_ioremap_resource() instead of devm_request_and_ioremap()
From: Tomi Valkeinen @ 2013-09-02  8:52 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <005401cea77c$6925eec0$3b71cc40$%han@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

Hi,

On 02/09/13 04:33, Jingoo Han wrote:
> Use devm_ioremap_resource() because devm_request_and_ioremap() is
> obsoleted by devm_ioremap_resource().
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/video/xilinxfb.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
> index 6629b29..ed90051 100644
> --- a/drivers/video/xilinxfb.c
> +++ b/drivers/video/xilinxfb.c
> @@ -260,9 +260,9 @@ static int xilinxfb_assign(struct platform_device *pdev,
>  
>  		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  		drvdata->regs_phys = res->start;
> -		drvdata->regs = devm_request_and_ioremap(&pdev->dev, res);
> -		if (!drvdata->regs) {
> -			rc = -EADDRNOTAVAIL;
> +		drvdata->regs = devm_ioremap_resource(&pdev->dev, res);
> +		if (IS_ERR(drvdata->regs)) {
> +			rc = PTR_ERR(drvdata->regs);
>  			goto err_region;
>  		}
>  	}

I have already applied a similar patch from Julia Lawall.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [RFC 00/22] OMAPDSS: DT support
From: Tomi Valkeinen @ 2013-09-02  8:00 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-omap, linux-fbdev, devicetree, Archit Taneja,
	Nishanth Menon, Felipe Balbi, Santosh Shilimkar, Tony Lindgren
In-Reply-To: <2305295.bk1TpuGLMv@avalon>

[-- Attachment #1: Type: text/plain, Size: 6522 bytes --]

On 22/08/13 00:07, Laurent Pinchart wrote:

Thanks for the comments!

>> The exception to the above are DSI and DBI. DSI and DBI are combined control
>> and video busses, but the use of the busses for control purposes is not
>> independent of the video stream. Also, the the busses are, in practice,
>> one-to-one links. And last, DSI and DBI display entities are often also
>> controllable via, say, i2c. For these reasons there is no real Linux bus
>> for DSI and DBI and thus the DSI and DBI devices are either platform
>> devices or i2c devices.
> 
> That's something I'm less convinced about, but I don't have a too strong 
> feeling. The best implementation should get to mainline, I won't nack this 
> architecture just for theoretical reasons.

Ok. I posted a response to your DBI bus patch about the issues I see.

>> DSI Module ID
>> =============
>>
>> On OMAP4 we have two DSI modules. To configure the clock routing and pin
>> muxing, we need to know the hardware module ID for the DSI device, i.e. is
>> this Linux platform device DSI1 or DSI2. The same issue exists with other
>> SoCs with multiple outputs of the same kind.
>>
>> With non-DT case, we used the platform device's ID directly. With DT, that
>> doesn't work. I don't currently have a good solution for this, so as a
>> temporary solution the DSI driver contains a table, from which it can find
>> the HW module ID by using the device's base address.
> 
> You could add two output ports to the DSS, one for each DSI, and link the DSI 
> modules to the DSS output ports in DT. That would represent the hardware 
> topology, and would allow the DSI driver to know its ID based on the DSS 
> output port it's connected to. It's still a bit hackish in the sense that the 
> DSI driver will use information provided by the DSS (the output port number), 
> but not more than the current method.

Hmm, yep. That's kind of the same as having an explicit 'module-id'
property in the DSI node. I had implemented that solution at some point,
but considered it too ugly. But I agree that deducing the module-id from
the DSS output port is a bit cleaner, as it doesn't need any special
properties. And it's maybe also better than the address table I have
now, as the address table requires special code for each SoC.

I have to try the V4L2 ports to understand fully how to use them.

In the end, I hope to get rid of the module-id totally. It's really not
a DSI-thing at all. The DSI hardware does not use the module-id for
anything, it's more about how the DSI module is glued in the DSS/SoC.

>> I have some ideas how to deduce the DSS version by poking to certain DSS
>> registers, but it is not yet tested so I don't know if it will work.
> 
> That might be a stupid question, but can't you just encode the version in the 
> compatible string of the DSS DT node (the one currently compatible with 
> "ti,omap[34]-dss") ?

That would require having separate DT files for each revision. For
example, we have Beagle boards with different OMAP reversions.

It's fine to have the version encoded in the compatible string for major
versions, but having all minor revisions encoded there could result in a
mess.

> Version information might also need to be split/duplicated in several of the 
> DSS DT nodes. A quick grep through the driver source code shows that the 
> version is used by the submodules to infer SoC glue information. For instance 
> dsi_get_channel() uses the version to find the DSI module channel ID. That 
> information could possibly be retrieved from the links between the DSS DT 
> nodes.

Hmm, yes. Well. The DISPC has multiple output channels: LCD, LCD2, LCD3,
TV (depending on the SoC). These outputs go to encoders, and the routing
can be configured. If we consider only DSI encoders on OMAP4, the LCD2
output can be configured to go to DSI1 or DSI2 modules. LCD1 output can
be configured to go to DSI1 (but not to DSI2).

Because the routing has restrictions like mentioned above, it's somewhat
difficult to allocate the DISPC output channels during runtime in a
totally dynamic manner. Say, if we happened to allocate LCD2 for DSI1,
and later we'd want to use DSI2, there would be no DISPC output to use.

That's why we currently have them hardcoded in the driver, and it works
ok in all the use cases we have now. However, some board could need to
setup the channels in some other way for some particular use case.

So, I'm not totally comfortable with hardcoding the DISPC output - DSS
encoder connections in the DT data. While it'd work for most cases, it
doesn't work for all.

Then again, if the connections in the DT data would be considered more
like a default set of connections, and they could be changed later from
the kernel/userspace, then it'd be fine.

>> Some of the DSS modules are actually a combination of multiple smaller
>> modules. For example, the DSI module contains DSI protocol, DSI PHY and DSI
>> PLL modules, each in their own address space. These could perhaps be
>> presented as separate DT nodes and Linux devices, but I am not sure if that
>> is a good approach or not.
> 
> What are the chances that one of those block will be upgraded and/or replaced 
> independently of the others in the future (I know it's a tricky question) ? It 
> might not be worth it going to a too fine-grained approach at the moment, but 
> we need to make sure that the DT bindings will allow an easy path forward if 
> needed.

For DSI, I believe the chances are quite small. But for HDMI, we already
have this case for OMAP4 and OMAP5, and we're currently working on
splitting the HDMI core, PHY and PLL properly. I think it makes sense to
do the same for DSI also at the same time, especially as the PLL for DSI
and HDMI is the same (afaik).

>> If we shouldn't add the bindings as unstable, when should the bindings be
>> added? Wait until CDF is in the mainline, and use that?
> 
> What about using the CDF bindings, without waiting for CDF to be in mainline ? 
> I believe the bindings should be upstreamed as unstable to start with anyway.

Yes, I think that makes sense. And that's what I've been aiming at. I'm
just missing the ports-stuff.

Then again, I see opinions that the old bindings should be supported
(e.g. the mails with Tony in this same thread). If so, using CDF
bindings without CDF being in the mainline is a bit risky, as the
bindings could well change.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Chen Gang @ 2013-09-02  6:45 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>

On 09/02/2013 02:45 PM, Tomi Valkeinen wrote:
> On 02/09/13 04:41, Chen Gang wrote:
> 
>> Hmm... at least we are agree with each other
>>
>>   "at least now, it should be never happen", is it correct ?
>>
>>
>> And we are disagree with each other:
>>
>>   "if it really happens, I think it is a critical bug, but you have different opinion", is it correct ?
> 
> Yes for both, if "critical" means that the kernel has to be halted
> immediately.
> 

Thank you for your confirmation.

:-)

>  Tomi
> 
> 


-- 
Chen Gang

^ permalink raw reply

* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Tomi Valkeinen @ 2013-09-02  6:45 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

On 02/09/13 04:41, Chen Gang wrote:

> Hmm... at least we are agree with each other
> 
>   "at least now, it should be never happen", is it correct ?
> 
> 
> And we are disagree with each other:
> 
>   "if it really happens, I think it is a critical bug, but you have different opinion", is it correct ?

Yes for both, if "critical" means that the kernel has to be halted
immediately.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [RFC 00/22] OMAPDSS: DT support
From: Tomi Valkeinen @ 2013-09-02  6:42 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap, linux-fbdev, devicetree, Archit Taneja,
	Laurent Pinchart, Nishanth Menon, Felipe Balbi, Santosh Shilimkar
In-Reply-To: <20130902061541.GU7656@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 3389 bytes --]

On 02/09/13 09:15, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [130830 02:55]:
>> On 13/08/13 10:54, Tony Lindgren wrote:
>>> * Tomi Valkeinen <tomi.valkeinen@ti.com> [130809 01:46]:
>>>>
>>>> So as is evident, I have things in my mind that should be improved. Maybe
>>>> the most important question for short term future is:
>>>>
>>>> Can we add DSS DT bindings for OMAP4 as unstable bindings? It would give us
>>>> some proper testing of the related code, and would also allow us to remove
>>>> the related hacks (which don't even work quite right). However, I have no
>>>> idea yet when the unstable DSS bindings would turn stable.
>>>>
>>>> If we shouldn't add the bindings as unstable, when should the bindings be
>>>> added? Wait until CDF is in the mainline, and use that?
>>>
>>> I don't think we should add any temporary bindings as it's going to be
>>> a pain to support those in the long run. I suggest you initially just
>>> stick to established bindings for the basic hardware IO address and
>>> interrupts etc, then those should still be valid with the generic panel
>>> bindings later on.
>>
>> I don't understand what does it matter if the bindings are temporary, or
>> basic established bindings. In both cases the DT data needs to be
>> changed when the CDF is taken into use.
> 
> Yes but the old bindings still need to be supported because people
> are doing devices using those. So any kind of temporary binding will be
> a pain to support.

If old bindings need to be supported, then we also need to support the
current state for Panda and SDP, i.e. there are no DSS related DT
bindings, but displays still work. Which means we'll have to keep the
current hacky DSS device construction mechanism for Panda and SDP.

Although maybe it's cleaner to somehow inject the DSS DT nodes for Panda
and SDP in case they are missing from the real DT data.

Doesn't supporting old bindings also mean that we can never get rid of
the hwmods? Or will there be code that injects the missing interrupt
etc. entries?

>> Well, one difference is that the temporary bindings would give us
>> working display, but having only basic bindings would not. So I don't
>> see any reason to add only the basic bindings. Or how would it work?
> 
> You might be able to use just a minimal binding for now using the
> basic reg, interrupt and entries for the various components. Those will
> be still valid when the CDF bindings are available.

Well, the entries will be valid, but the displays won't work with just
the basic bindings. I could perhaps add a new hack that creates the
required panel devices and video pipeline connections dynamically in
code for Panda and SDP, a bit like what the code does now, except the
basic DSS entries would be in the DT. But that would just add another
set of DT data that I would need to support in the future, and there
would be three different cases to support for Panda and SDP:

- DT data with no DSS related nodes
- DT data with basic DSS related nodes
- DT data with full DSS

So... If old bindings have to be supported, I'd rather try to minimize
the pain, and not add anything but the final bindings. In retrospect, it
was a bit of a mistake to add the hacky DT display support for Panda and
SDP, as it won't be very nice to keep supporting those.

  Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [RFC 00/22] OMAPDSS: DT support
From: Tony Lindgren @ 2013-09-02  6:15 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-omap, linux-fbdev, devicetree, Archit Taneja,
	Laurent Pinchart, Nishanth Menon, Felipe Balbi, Santosh Shilimkar
In-Reply-To: <52206A48.8040401@ti.com>

* Tomi Valkeinen <tomi.valkeinen@ti.com> [130830 02:55]:
> On 13/08/13 10:54, Tony Lindgren wrote:
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [130809 01:46]:
> >>
> >> So as is evident, I have things in my mind that should be improved. Maybe
> >> the most important question for short term future is:
> >>
> >> Can we add DSS DT bindings for OMAP4 as unstable bindings? It would give us
> >> some proper testing of the related code, and would also allow us to remove
> >> the related hacks (which don't even work quite right). However, I have no
> >> idea yet when the unstable DSS bindings would turn stable.
> >>
> >> If we shouldn't add the bindings as unstable, when should the bindings be
> >> added? Wait until CDF is in the mainline, and use that?
> > 
> > I don't think we should add any temporary bindings as it's going to be
> > a pain to support those in the long run. I suggest you initially just
> > stick to established bindings for the basic hardware IO address and
> > interrupts etc, then those should still be valid with the generic panel
> > bindings later on.
> 
> I don't understand what does it matter if the bindings are temporary, or
> basic established bindings. In both cases the DT data needs to be
> changed when the CDF is taken into use.

Yes but the old bindings still need to be supported because people
are doing devices using those. So any kind of temporary binding will be
a pain to support.
 
> Well, one difference is that the temporary bindings would give us
> working display, but having only basic bindings would not. So I don't
> see any reason to add only the basic bindings. Or how would it work?

You might be able to use just a minimal binding for now using the
basic reg, interrupt and entries for the various components. Those will
be still valid when the CDF bindings are available.

Regards,

Tony

^ permalink raw reply

* Re: [PATCH] video: xilinxfb: use devm_ioremap_resource() instead of devm_request_and_ioremap()
From: Michal Simek @ 2013-09-02  6:01 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <005401cea77c$6925eec0$3b71cc40$%han@samsung.com>

On 09/02/2013 03:33 AM, Jingoo Han wrote:
> Use devm_ioremap_resource() because devm_request_and_ioremap() is
> obsoleted by devm_ioremap_resource().
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/video/xilinxfb.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
> index 6629b29..ed90051 100644
> --- a/drivers/video/xilinxfb.c
> +++ b/drivers/video/xilinxfb.c
> @@ -260,9 +260,9 @@ static int xilinxfb_assign(struct platform_device *pdev,
>  
>  		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  		drvdata->regs_phys = res->start;
> -		drvdata->regs = devm_request_and_ioremap(&pdev->dev, res);
> -		if (!drvdata->regs) {
> -			rc = -EADDRNOTAVAIL;
> +		drvdata->regs = devm_ioremap_resource(&pdev->dev, res);
> +		if (IS_ERR(drvdata->regs)) {
> +			rc = PTR_ERR(drvdata->regs);
>  			goto err_region;
>  		}
>  	}
> 

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal



^ permalink raw reply

* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Chen Gang @ 2013-09-02  1:41 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>

On 08/30/2013 06:52 PM, Tomi Valkeinen wrote:
> On 30/08/13 13:41, Chen Gang wrote:
>> On 08/30/2013 06:19 PM, Tomi Valkeinen wrote:
> 
>>> Here's some old discussion about BUG:
>>>
>>> http://yarchive.net/comp/linux/BUG.html
>>>
>>
>> Yeah, if it is not a real bug (can handle it), we should not use BUG(),
>> but when we are sure it is a kernel bug, and the kernel will continue
>> blindly, we need use BUG() to stop it.
>>
>> Just like the Linus Torvalds said in the link which you provide:
>>
>> "Rule of thumb: BUG() is only good for something that never happens and
>> that we really have no other option for (ie state is so corrupt that
>> continuing is deadly)".
> 
> I guess this is where we disagree. I don't see having a corrupt bpp
> value in a fb driver's internal function as "so corrupt that continuing
> is deadly".
> 

Hmm... at least we are agree with each other

  "at least now, it should be never happen", is it correct ?


And we are disagree with each other:

  "if it really happens, I think it is a critical bug, but you have different opinion", is it correct ?


> Anyway, if you insist on the BUG(), I'll leave this patch to
> Jean-Christophe. I'm only taking small-ish patches that have no open
> issues or disagreements.
> 

OK, thank you for spending your time resources to provide your
suggestion and opinion.

And welcome another members' suggestion and completions.

>  Tomi
> 
> 


Thanks.
-- 
Chen Gang

^ permalink raw reply

* [PATCH] video: xilinxfb: use devm_ioremap_resource() instead of devm_request_and_ioremap()
From: Jingoo Han @ 2013-09-02  1:33 UTC (permalink / raw)
  To: linux-fbdev

Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/xilinxfb.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 6629b29..ed90051 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -260,9 +260,9 @@ static int xilinxfb_assign(struct platform_device *pdev,
 
 		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 		drvdata->regs_phys = res->start;
-		drvdata->regs = devm_request_and_ioremap(&pdev->dev, res);
-		if (!drvdata->regs) {
-			rc = -EADDRNOTAVAIL;
+		drvdata->regs = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(drvdata->regs)) {
+			rc = PTR_ERR(drvdata->regs);
 			goto err_region;
 		}
 	}
-- 
1.7.10.4



^ permalink raw reply related

* Re: [PATCH] omap2: panel-generic: Added panel parameters for ortus-com37h3m05dtc/99dtc and sharp-lq0
From: Belisko Marek @ 2013-09-01 12:32 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Jean-Christophe PLAGNIOL-VILLARD, linux-omap@vger.kernel.org,
	linux-fbdev, LKML, H. Nikolaus Schaller
In-Reply-To: <52205056.8080908@ti.com>

Hi Tomi,

On Fri, Aug 30, 2013 at 9:57 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On 29/08/13 15:35, Marek Belisko wrote:
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> Signed-off-by: Marek Belisko <marek@goldelico.com>
>> ---
>>  drivers/video/omap2/displays/panel-generic-dpi.c | 53 ++++++++++++++++++++++++
>>  1 file changed, 53 insertions(+)
>>
>> diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c
>> index bebebd4..d573291 100644
>> --- a/drivers/video/omap2/displays/panel-generic-dpi.c
>> +++ b/drivers/video/omap2/displays/panel-generic-dpi.c
>> @@ -107,6 +107,33 @@ static struct panel_config generic_dpi_panels[] = {
>>               .name                   = "sharp_ls",
>>       },
>
> The drivers in drivers/video/omap2/displays/ are on their way out, and
> will probably be removed for 3.12. Please look at the new one at
> drivers/video/omap2/displays-new/panel-dpi.c.
I've probably miss series (OMAPDSS: remove old panel model code)
and in time when sent patch it wasn't in linux-next yes. AFAIU generic
panel settings
was moved to board files which is not case for our patch as gta04
(other) board with panel isn't yes mainlined.
>
>  Tomi
>
>

Regards,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

^ permalink raw reply

* RE: [PATCH 0/4] video: da8xx-fb: numerous bugfixes
From: Etheridge, Darren @ 2013-08-30 15:25 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1377294773-25678-1-git-send-email-detheridge@ti.com>

> From: Valkeinen, Tomi
> Sent: Friday, August 30, 2013 6:53 AM
> >
> > Darren Etheridge (4):
> >   video: da8xx-fb fixing incorrect porch mappings
> >   video: da8xx-fb: fixing timing off by one errors
> >   video: da8xx-fb: support lcdc v2 timing register expansion
> >   video: da8xx-fb: fix the polarities of the hsync/vsync pulse
> >
> >  drivers/video/da8xx-fb.c |   35 +++++++++++++++++++++++++----------
> >  1 files changed, 25 insertions(+), 10 deletions(-)
> >
> 
> These look good to me, queuing for 3.12.
> 
> There was a space missing between 'if' and '(' in one of the patches, I fixed
> that.
> 
>  Tomi
> 
Tomi,

Thank you.

Darren


^ permalink raw reply

* Re: Bochs VBE & Virtualbox framebuffer driver
From: Tomi Valkeinen @ 2013-08-30 11:58 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <5211D634.3010204@castus.tv>

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

Hi,

On 19/08/13 11:24, Jonathan Campbell wrote:
> This is an experimental framebuffer driver for VirtualBox and Bochs VBE
> displays. It started off as a proof of concept and grew into the code it
> is now. When testing Linux in Bochs or VirtualBox this allows greater
> control over the display and bit depth, though no h/w acceleration.
> 
> What do you think? Would this be something that could make it into the
> mainline kernel?

I don't see why not, although I know nothing about VirtualBox nor Bochs.
But with a very quick glance, it at least needs to be changed to match
the kernel coding conventions.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCH 0/4] video: da8xx-fb: numerous bugfixes
From: Tomi Valkeinen @ 2013-08-30 11:52 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1377294773-25678-1-git-send-email-detheridge@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]

Hi,

On 24/08/13 00:52, Darren Etheridge wrote:
> In developing a driver for an HDMI encoder to be attached to the LCD controller
> on TI AM335x SoC I ran across a number of bugs in the da8xx-fb.c fbdev driver.
> Two of them appear to have been in the driver for a while (02 and 04), one of
> them is a deficiency where some LCD controller version 2 features have not been
> utilized (03) and the last one was introduced in the last patch series that I
> submitted for this driver (01).
> 
> These patches do not change the behavior of the AM335x EVM's platforms LCD
> panel even though the current values set by the driver are wrong.  I guess LCD
> panels (at least the one used on AM335x EVM) must be fairly immune to bad
> timings coming from the LCD controller.  However the HDMI encoder simply will
> not work without these fixes, and quite possibly other LCD panels could behave
> the same way.
> 
> These patches apply on top of the patch series called:
> "video/da8xx-fb fbdev driver enhance to support TI am335x SoC"
> that was submitted by me.
> 
> Darren Etheridge (4):
>   video: da8xx-fb fixing incorrect porch mappings
>   video: da8xx-fb: fixing timing off by one errors
>   video: da8xx-fb: support lcdc v2 timing register expansion
>   video: da8xx-fb: fix the polarities of the hsync/vsync pulse
> 
>  drivers/video/da8xx-fb.c |   35 +++++++++++++++++++++++++----------
>  1 files changed, 25 insertions(+), 10 deletions(-)
> 

These look good to me, queuing for 3.12.

There was a space missing between 'if' and '(' in one of the patches, I
fixed that.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Tomi Valkeinen @ 2013-08-30 10:52 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

On 30/08/13 13:41, Chen Gang wrote:
> On 08/30/2013 06:19 PM, Tomi Valkeinen wrote:

>> Here's some old discussion about BUG:
>>
>> http://yarchive.net/comp/linux/BUG.html
>>
> 
> Yeah, if it is not a real bug (can handle it), we should not use BUG(),
> but when we are sure it is a kernel bug, and the kernel will continue
> blindly, we need use BUG() to stop it.
> 
> Just like the Linus Torvalds said in the link which you provide:
> 
> "Rule of thumb: BUG() is only good for something that never happens and
> that we really have no other option for (ie state is so corrupt that
> continuing is deadly)".

I guess this is where we disagree. I don't see having a corrupt bpp
value in a fb driver's internal function as "so corrupt that continuing
is deadly".

Anyway, if you insist on the BUG(), I'll leave this patch to
Jean-Christophe. I'm only taking small-ish patches that have no open
issues or disagreements.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Chen Gang @ 2013-08-30 10:41 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>

On 08/30/2013 06:19 PM, Tomi Valkeinen wrote:
> On 30/08/13 12:45, Chen Gang wrote:
>> On 08/30/2013 05:16 PM, Tomi Valkeinen wrote:
> 
>>> So, in my opinion:
>>>
>>> - Normally we should presume the the stack is not corrupted, or
>>> otherwise we'll end up with lots of checks all over.
>>>
>>
>> It seems the above reply "Hmm... it really has quite a few same cases
>> ..." is suitable for discussing with your opinion.
> 
> Well, if other drivers do silly things, it's no reason to do it here also.
> 

Hmm... I can understand.  What I have done is only just "satisfy the
compiler".

>>
>>> - Even if i740_calc_fifo() is a static function, and we can analyze the
>>> _current_ situation, we don't know how the driver will evolve in the future.
>>>
>>
>> For normal static function (not callback function) it can be in control
>> within inside (ourselves), don't like extern function, it is out of
>> control with inside.
>>
>> So we can assume something in the future.
> 
> We can assume that only if we presume that the future changes are
> bug-free. But more often than not there are bugs in the kernel drivers.
> 

Yeah.

> Now, say, if such a bug is introduced, and somebody is running the
> kernel in a remote server, the driver will call BUG(). This will cause
> the server to halt. The user won't see what happened, the connections
> are just lost and the error is not written to a hard disk.
> 

For our case, it we don't call BUG(), the kernel will continue blindly,
and in most cases, at last it will die too (or zombie, or some other
critical issues).

So BUG() is only for trying to protect the kernel continue blindly.


> If, instead, the driver would do WARN, and continue or fail in a
> controlled manner, the user can find out about the issue easily. Even if
> there is a stack corruption, it's most likely the driver in question
> that has it, and thus not really fatal.
> 

Hmm, in my opinion, four our case, it is fatal, need try to stop kernel
as soon as possible (don't let it continue blindly).

> Sure, there's the possibility that there's a bigger memory corruption,
> which would go unnoticed by, say, the filesystem layer, resulting in a
> corrupted filesystem. And we would catch this corruption by checking the
> bpp variable. But, really, I find that very unlikely scenario.
> 

Yeah. In fact the reason why I focus on 'bpp' is because of "satisfying
the compiler" (not let it report warning).

> Here's some old discussion about BUG:
> 
> http://yarchive.net/comp/linux/BUG.html
> 

Yeah, if it is not a real bug (can handle it), we should not use BUG(),
but when we are sure it is a kernel bug, and the kernel will continue
blindly, we need use BUG() to stop it.

Just like the Linus Torvalds said in the link which you provide:

"Rule of thumb: BUG() is only good for something that never happens and
that we really have no other option for (ie state is so corrupt that
continuing is deadly)".

In fact, for our case, when "default" happens: it is just match the
contents above.

>  Tomi
> 
> 


Thanks.
-- 
Chen Gang

^ permalink raw reply

* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Tomi Valkeinen @ 2013-08-30 10:19 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>

[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]

On 30/08/13 12:45, Chen Gang wrote:
> On 08/30/2013 05:16 PM, Tomi Valkeinen wrote:

>> So, in my opinion:
>>
>> - Normally we should presume the the stack is not corrupted, or
>> otherwise we'll end up with lots of checks all over.
>>
> 
> It seems the above reply "Hmm... it really has quite a few same cases
> ..." is suitable for discussing with your opinion.

Well, if other drivers do silly things, it's no reason to do it here also.

> 
>> - Even if i740_calc_fifo() is a static function, and we can analyze the
>> _current_ situation, we don't know how the driver will evolve in the future.
>>
> 
> For normal static function (not callback function) it can be in control
> within inside (ourselves), don't like extern function, it is out of
> control with inside.
> 
> So we can assume something in the future.

We can assume that only if we presume that the future changes are
bug-free. But more often than not there are bugs in the kernel drivers.

Now, say, if such a bug is introduced, and somebody is running the
kernel in a remote server, the driver will call BUG(). This will cause
the server to halt. The user won't see what happened, the connections
are just lost and the error is not written to a hard disk.

If, instead, the driver would do WARN, and continue or fail in a
controlled manner, the user can find out about the issue easily. Even if
there is a stack corruption, it's most likely the driver in question
that has it, and thus not really fatal.

Sure, there's the possibility that there's a bigger memory corruption,
which would go unnoticed by, say, the filesystem layer, resulting in a
corrupted filesystem. And we would catch this corruption by checking the
bpp variable. But, really, I find that very unlikely scenario.

Here's some old discussion about BUG:

http://yarchive.net/comp/linux/BUG.html

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [RFC 00/22] OMAPDSS: DT support
From: Tomi Valkeinen @ 2013-08-30  9:47 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap, linux-fbdev, devicetree, Archit Taneja,
	Laurent Pinchart, Nishanth Menon, Felipe Balbi, Santosh Shilimkar
In-Reply-To: <20130813075449.GS7656@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

On 13/08/13 10:54, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [130809 01:46]:
>>
>> So as is evident, I have things in my mind that should be improved. Maybe
>> the most important question for short term future is:
>>
>> Can we add DSS DT bindings for OMAP4 as unstable bindings? It would give us
>> some proper testing of the related code, and would also allow us to remove
>> the related hacks (which don't even work quite right). However, I have no
>> idea yet when the unstable DSS bindings would turn stable.
>>
>> If we shouldn't add the bindings as unstable, when should the bindings be
>> added? Wait until CDF is in the mainline, and use that?
> 
> I don't think we should add any temporary bindings as it's going to be
> a pain to support those in the long run. I suggest you initially just
> stick to established bindings for the basic hardware IO address and
> interrupts etc, then those should still be valid with the generic panel
> bindings later on.

I don't understand what does it matter if the bindings are temporary, or
basic established bindings. In both cases the DT data needs to be
changed when the CDF is taken into use.

Well, one difference is that the temporary bindings would give us
working display, but having only basic bindings would not. So I don't
see any reason to add only the basic bindings. Or how would it work?

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Chen Gang @ 2013-08-30  9:45 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>

On 08/30/2013 05:16 PM, Tomi Valkeinen wrote:
> On 30/08/13 11:44, Chen Gang wrote:
>> On 08/30/2013 04:36 PM, Tomi Valkeinen wrote:
>>> On 30/08/13 11:17, Chen Gang wrote:
>>>> On 08/30/2013 03:21 PM, Tomi Valkeinen wrote:
>>>
>>>>> I don't think you should use BUG there. BUG should be used when there's
>>>>> not really a good way to continue. Here you could have just a WARN, and
>>>>> return some default FIFO watermark value.
>>>>>
>>>>
>>>> i740_calc_fifo() is a static function, so we can check its caller's
>>>> information to find the suitable fixing ways (for extern function, we
>>>> almost can not do like this).
>>>>
>>>> it has only one caller i740fb_decode_var(), which has already let 'bpp'
>>>> within the values (8, 15, 16, 24, 32). So if another values occurs, it
>>>> must be a BUG (e.g. the stack may override under ia32).
>>>
>>> My point was that there should almost never be need for BUG in a normal
>>> driver. BUG means that the whole kernel will probably halt. Even if an
>>> fb driver encounters a problem that should never happen, it should maybe
>>> give a WARN, and continue or fail in a controlled manner.
>>>
>>
>> e.g when the stack is override under ia32, it is better to stop continue
>> as soon as possible to try to avoid the kernel continue blindly, that
>> may let the coredump/KDB analyzers' work much easier.
>>
>> Hmm... when driver cause issue, it has effect with the whole kernel
>> (kernel may die soon), so BUG() is used under the whole kernel wide
>> (include normal drivers).
> 
> You want i740_calc_fifo() to check the bpp parameter and issue a BUG if
> it's not a valid bpp-value, because in the current driver
> i740_calc_fifo() is never called with a non-valid bpp, and thus a wrong
> bpp indicates a stack corruption?
> 

Yes, it is just an e.g. (may also has another samples)

> How about the freq parameter? In the current driver freq can never be
> higher than 1000000. If it is, it's stack corruption. Maybe there should
> be a BUG for that case also?
> 

So I said:

"Hmm... it really has quite a few same cases in kernel wide like our
case, but at least they do not report warnings (this does not like our
case), so let just fix our case to satisfy the compiler. :-) "

> As I see it, you're just checking a single arbitrary value in an
> arbitrary place in the driver, and protecting against stack corruption
> there. Why not check all the values in all the functions of the driver
> as well, looking for stack corruptions?
>

BUG() can not protect issues, it can try to protect the kernel continue
blindly after kernel has issue.


> And the bigger issue is that you're only talking about the current
> driver. The driver could be changed tomorrow, maybe calling
> i740_calc_fifo() from some other place, where a wrong bpp could just
> possibly happen. In that case it wouldn't be a stack corruption, but a
> "normal" driver bug.
> 

Yeah, BUG() is for bugs in kernel wide, ('stack corruption' is just one
of sample).

And BUG() only report the direct cause, not report the root cause, so
when one sub system report BUG, it does not mean this sub system must
has this BUG.


> So, in my opinion:
> 
> - Normally we should presume the the stack is not corrupted, or
> otherwise we'll end up with lots of checks all over.
> 

It seems the above reply "Hmm... it really has quite a few same cases
..." is suitable for discussing with your opinion.


> - Even if i740_calc_fifo() is a static function, and we can analyze the
> _current_ situation, we don't know how the driver will evolve in the future.
> 

For normal static function (not callback function) it can be in control
within inside (ourselves), don't like extern function, it is out of
control with inside.

So we can assume something in the future.

>  Tomi
> 
> 

Thanks.
-- 
Chen Gang

^ permalink raw reply

* Re: [PATCH 6/7] video: xilinxfb: replace devm_request_and_ioremap by devm_ioremap_resource
From: Tomi Valkeinen @ 2013-08-30  9:42 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Jean-Christophe Plagniol-Villard, kernel-janitors, linux-fbdev,
	linux-kernel
In-Reply-To: <1376911241-27720-7-git-send-email-Julia.Lawall@lip6.fr>

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

On 19/08/13 14:20, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> Use devm_ioremap_resource instead of devm_request_and_ioremap.
> 
> This was done using the semantic patch
> scripts/coccinelle/api/devm_ioremap_resource.cocci
> 
> The initialization of drvdata->regs_phys was manually moved lower, to take
> advantage of the NULL test on res performed by devm_ioremap_resource.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/video/xilinxfb.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
> index 6629b29..84c664e 100644
> --- a/drivers/video/xilinxfb.c
> +++ b/drivers/video/xilinxfb.c
> @@ -259,12 +259,12 @@ static int xilinxfb_assign(struct platform_device *pdev,
>  		struct resource *res;
>  
>  		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -		drvdata->regs_phys = res->start;
> -		drvdata->regs = devm_request_and_ioremap(&pdev->dev, res);
> -		if (!drvdata->regs) {
> -			rc = -EADDRNOTAVAIL;
> +		drvdata->regs = devm_ioremap_resource(&pdev->dev, res);
> +		if (IS_ERR(drvdata->regs)) {
> +			rc = PTR_ERR(drvdata->regs);
>  			goto err_region;
>  		}
> +		drvdata->regs_phys = res->start;
>  	}
>  
>  	/* Allocate the framebuffer memory */

Thanks, queued for 3.12.

 Tomi




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Tomi Valkeinen @ 2013-08-30  9:16 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>

[-- Attachment #1: Type: text/plain, Size: 2757 bytes --]

On 30/08/13 11:44, Chen Gang wrote:
> On 08/30/2013 04:36 PM, Tomi Valkeinen wrote:
>> On 30/08/13 11:17, Chen Gang wrote:
>>> On 08/30/2013 03:21 PM, Tomi Valkeinen wrote:
>>
>>>> I don't think you should use BUG there. BUG should be used when there's
>>>> not really a good way to continue. Here you could have just a WARN, and
>>>> return some default FIFO watermark value.
>>>>
>>>
>>> i740_calc_fifo() is a static function, so we can check its caller's
>>> information to find the suitable fixing ways (for extern function, we
>>> almost can not do like this).
>>>
>>> it has only one caller i740fb_decode_var(), which has already let 'bpp'
>>> within the values (8, 15, 16, 24, 32). So if another values occurs, it
>>> must be a BUG (e.g. the stack may override under ia32).
>>
>> My point was that there should almost never be need for BUG in a normal
>> driver. BUG means that the whole kernel will probably halt. Even if an
>> fb driver encounters a problem that should never happen, it should maybe
>> give a WARN, and continue or fail in a controlled manner.
>>
> 
> e.g when the stack is override under ia32, it is better to stop continue
> as soon as possible to try to avoid the kernel continue blindly, that
> may let the coredump/KDB analyzers' work much easier.
> 
> Hmm... when driver cause issue, it has effect with the whole kernel
> (kernel may die soon), so BUG() is used under the whole kernel wide
> (include normal drivers).

You want i740_calc_fifo() to check the bpp parameter and issue a BUG if
it's not a valid bpp-value, because in the current driver
i740_calc_fifo() is never called with a non-valid bpp, and thus a wrong
bpp indicates a stack corruption?

How about the freq parameter? In the current driver freq can never be
higher than 1000000. If it is, it's stack corruption. Maybe there should
be a BUG for that case also?

As I see it, you're just checking a single arbitrary value in an
arbitrary place in the driver, and protecting against stack corruption
there. Why not check all the values in all the functions of the driver
as well, looking for stack corruptions?

And the bigger issue is that you're only talking about the current
driver. The driver could be changed tomorrow, maybe calling
i740_calc_fifo() from some other place, where a wrong bpp could just
possibly happen. In that case it wouldn't be a stack corruption, but a
"normal" driver bug.

So, in my opinion:

- Normally we should presume the the stack is not corrupted, or
otherwise we'll end up with lots of checks all over.

- Even if i740_calc_fifo() is a static function, and we can analyze the
_current_ situation, we don't know how the driver will evolve in the future.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply

* Re: [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings
From: Chen Gang @ 2013-08-30  8:47 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <5212D594.3020802@asianux.com>

On 08/30/2013 04:41 PM, Tomi Valkeinen wrote:
> On 20/08/13 05:33, Chen Gang wrote:
>> fb_set_cmap() already checks the parameters, so need remove the
>> redundancy checking.
>>
>> This redundancy checking is also incorrect, the related warning:
>>
>>   drivers/video/fbcmap.c:288:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> ---
>>  drivers/video/fbcmap.c |    7 +------
>>  1 files changed, 1 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
>> index 5c3960d..f89245b 100644
>> --- a/drivers/video/fbcmap.c
>> +++ b/drivers/video/fbcmap.c
>> @@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
>>  		rc = -ENODEV;
>>  		goto out;
>>  	}
>> -	if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
>> -				!info->fbops->fb_setcmap)) {
>> -		rc = -EINVAL;
>> -		goto out1;
>> -	}
>> +
>>  	rc = fb_set_cmap(&umap, info);
>> -out1:
>>  	unlock_fb_info(info);
>>  out:
>>  	fb_dealloc_cmap(&umap);
>>
> 
> Thanks, queued this for 3.12.
> 

Thank you too.

>  Tomi
> 
> 


-- 
Chen Gang

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox