Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-07-13 Thread Daniel Vetter
On Thu, Jul 12, 2018 at 03:14:57PM +0200, Marek Vasut wrote:
> On 07/12/2018 03:03 PM, Leonard Crestez wrote:
> > On Thu, 2018-07-12 at 11:21 +0200, Stefan Agner wrote:
> >> On 10.07.2018 11:11, Marek Vasut wrote:
> >>> On 07/10/2018 11:06 AM, Stefan Agner wrote:
>  This is one of the situation where states quo is kinda the worst
>  situation.
> 
>  Currently imx_v6_v7_defconfig and mxs_defconfig actually still uses
>  CONFIG_FB_MXS.
> 
>  I understand that you'd rather prefer to move forward. I suggest we do
>  it in steps.
> 
>  In 4.19:
> 
>  - Change DRM driver.name to mxsfb-drm so we avoid conflicts for now
> >>>
> >>> But this will break mesa if it depends on mxsfb name for ie. etnaviv
> >>> binding.
> >>
> >> Does it? grep -r -e mxsfb in libdrm and mesa master returns nothing.
> >>
> >> There is also .name in struct drm_driver, which is already set to
> >> mxsfb-drm... Is that the one exposed to user space?
> > 
> > Running etnaviv+x11 with a renamed mxsfb driver works fine on imx6sx-
> > sdb.
> > 
> > Tools like modetest already need -M mxsfb-drm, the drm_driver.name
> > seems to be what matters.
> > 
> >> - Remove CONFIG_FB_MXS from imx_v6_v7_defconfig/mxs_defconfig now, and
> >> only enable CONFIG_DRM_MXSFB=y
> > 
> > If one of the drivers is renamed then they can coexist: since the
> > bindings are distinct one driver will return a probe error and the
> > other will bind successfully. This can even be adjusted so that it
> > doesn't even print ugly scary errors.
> > 
> > This can last until somebody implements support for old bindings in the
> > drm driver and then FB_MXS can just be deleted.
> 
> So why don't we just convert the DT bindings on boards supported
> upstream and zap the old driver ? What is the problem with that?

+1 on zapping drivers :-)

> Realistically, how many MXS boards in the field use old DT and new kernel ?

Yeah I think occasionally that entire "DT is API, can't ever change it"
song is overblown. The rule with regressions isn't that you're never
allowed to break anything, but that you're only allowed to break stuff no
one will notice and report.

If there's realistically no users, go ahead and break (instead of huge and
drawn-out compat plan).

If there's a solid (and automatic enough) fallback like the drm driver,
go ahead and break.

We're doing this all the time in graphics with userspace ABI, I don't
think DT is any different. Every once in a while there's a bit of regrets
and a revert because we missed something, but overal it's much less effort
than always trying to do a perfect job with backwards compat.

Is it really a regression if no one reports it? No.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-07-13 Thread Marek Vasut
On 07/12/2018 03:03 PM, Leonard Crestez wrote:
> On Thu, 2018-07-12 at 11:21 +0200, Stefan Agner wrote:
>> On 10.07.2018 11:11, Marek Vasut wrote:
>>> On 07/10/2018 11:06 AM, Stefan Agner wrote:
 This is one of the situation where states quo is kinda the worst
 situation.

 Currently imx_v6_v7_defconfig and mxs_defconfig actually still uses
 CONFIG_FB_MXS.

 I understand that you'd rather prefer to move forward. I suggest we do
 it in steps.

 In 4.19:

 - Change DRM driver.name to mxsfb-drm so we avoid conflicts for now
>>>
>>> But this will break mesa if it depends on mxsfb name for ie. etnaviv
>>> binding.
>>
>> Does it? grep -r -e mxsfb in libdrm and mesa master returns nothing.
>>
>> There is also .name in struct drm_driver, which is already set to
>> mxsfb-drm... Is that the one exposed to user space?
> 
> Running etnaviv+x11 with a renamed mxsfb driver works fine on imx6sx-
> sdb.
> 
> Tools like modetest already need -M mxsfb-drm, the drm_driver.name
> seems to be what matters.
> 
>> - Remove CONFIG_FB_MXS from imx_v6_v7_defconfig/mxs_defconfig now, and
>> only enable CONFIG_DRM_MXSFB=y
> 
> If one of the drivers is renamed then they can coexist: since the
> bindings are distinct one driver will return a probe error and the
> other will bind successfully. This can even be adjusted so that it
> doesn't even print ugly scary errors.
> 
> This can last until somebody implements support for old bindings in the
> drm driver and then FB_MXS can just be deleted.

So why don't we just convert the DT bindings on boards supported
upstream and zap the old driver ? What is the problem with that?

Realistically, how many MXS boards in the field use old DT and new kernel ?

-- 
Best regards,
Marek Vasut
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-07-13 Thread Leonard Crestez
On Thu, 2018-07-12 at 11:21 +0200, Stefan Agner wrote:
> On 10.07.2018 11:11, Marek Vasut wrote:
> > On 07/10/2018 11:06 AM, Stefan Agner wrote:
> > > This is one of the situation where states quo is kinda the worst
> > > situation.
> > > 
> > > Currently imx_v6_v7_defconfig and mxs_defconfig actually still uses
> > > CONFIG_FB_MXS.
> > > 
> > > I understand that you'd rather prefer to move forward. I suggest we do
> > > it in steps.
> > > 
> > > In 4.19:
> > > 
> > > - Change DRM driver.name to mxsfb-drm so we avoid conflicts for now
> > 
> > But this will break mesa if it depends on mxsfb name for ie. etnaviv
> > binding.
> 
> Does it? grep -r -e mxsfb in libdrm and mesa master returns nothing.
> 
> There is also .name in struct drm_driver, which is already set to
> mxsfb-drm... Is that the one exposed to user space?

Running etnaviv+x11 with a renamed mxsfb driver works fine on imx6sx-
sdb.

Tools like modetest already need -M mxsfb-drm, the drm_driver.name
seems to be what matters.

> - Remove CONFIG_FB_MXS from imx_v6_v7_defconfig/mxs_defconfig now, and
> only enable CONFIG_DRM_MXSFB=y

If one of the drivers is renamed then they can coexist: since the
bindings are distinct one driver will return a probe error and the
other will bind successfully. This can even be adjusted so that it
doesn't even print ugly scary errors.

This can last until somebody implements support for old bindings in the
drm driver and then FB_MXS can just be deleted.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-07-12 Thread Stefan Agner
On 12.07.2018 15:03, Leonard Crestez wrote:
> On Thu, 2018-07-12 at 11:21 +0200, Stefan Agner wrote:
>> On 10.07.2018 11:11, Marek Vasut wrote:
>> > On 07/10/2018 11:06 AM, Stefan Agner wrote:
>> > > This is one of the situation where states quo is kinda the worst
>> > > situation.
>> > >
>> > > Currently imx_v6_v7_defconfig and mxs_defconfig actually still uses
>> > > CONFIG_FB_MXS.
>> > >
>> > > I understand that you'd rather prefer to move forward. I suggest we do
>> > > it in steps.
>> > >
>> > > In 4.19:
>> > >
>> > > - Change DRM driver.name to mxsfb-drm so we avoid conflicts for now
>> >
>> > But this will break mesa if it depends on mxsfb name for ie. etnaviv
>> > binding.
>>
>> Does it? grep -r -e mxsfb in libdrm and mesa master returns nothing.
>>
>> There is also .name in struct drm_driver, which is already set to
>> mxsfb-drm... Is that the one exposed to user space?
> 
> Running etnaviv+x11 with a renamed mxsfb driver works fine on imx6sx-
> sdb.
> 
> Tools like modetest already need -M mxsfb-drm, the drm_driver.name
> seems to be what matters.

Ok, almost thought so, thanks for the confirmation! So we should be
good.

> 
>> - Remove CONFIG_FB_MXS from imx_v6_v7_defconfig/mxs_defconfig now, and
>> only enable CONFIG_DRM_MXSFB=y
> 
> If one of the drivers is renamed then they can coexist: since the
> bindings are distinct one driver will return a probe error and the
> other will bind successfully. This can even be adjusted so that it
> doesn't even print ugly scary errors.
> 
> This can last until somebody implements support for old bindings in the
> drm driver and then FB_MXS can just be deleted.

Yeah I guess that is what Marek don't want because it promotes using
FB_MXS for longer than needed.

I don't care as much since we anyway use the MXSFB DRM driver. However,
what I really dislike is that a kernel compiled with both drivers
currently leads to MXSFB DRM being unusable (because fbdev gets probed
first). I feel removing the MXS_FB is rather harsh, so I *really* would
love to see the MXSFB DRM driver renamed.

--
Stefan
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-07-12 Thread Stefan Agner
[adding Authors of the problematic device trees]

On 10.07.2018 11:11, Marek Vasut wrote:
> On 07/10/2018 11:06 AM, Stefan Agner wrote:
>> On 16.06.2018 01:32, Marek Vasut wrote:
>>> On 06/16/2018 12:42 AM, Leonard Crestez wrote:
 On Fri, 2018-06-15 at 23:36 +0200, Marek Vasut wrote:
> On 06/15/2018 10:58 PM, Leonard Crestez wrote:
>> On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
>>> On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
>>>  wrote:

 The FBDEV driver uses the same name and both can't be registered at the
 same time. Fix this by renaming the drm driver to mxsfb-drm
>>>
>>> Stefan sent the same patch a few days ago:
>>
>> In that thread there is a proposal for removing the old fbdev/mxsfb
>> driver entirely.
>>
>> That would break old DTBs, isn't this generally considered bad? Also,
>> are we sure the removal of fbdev/mxsfb wouldn't lose any features?
>>
>> What my series does is make both drivers work with the same kernel
>> image and turns the choice into a board-level dtb decision. Supporting
>> everything at once seems desirable to me and it allows for a very
>> smooth upgrade path.
>
> Having two drivers in the kernel with different set of bugs is always bad.
>
>> The old driver could be removed later, after all users are converted.
>
> Both drivers were in for long enough already. And let's be realistic,
> how many MX23/MX28 users of old DTs with new kernels are there who
> cannot update the DT as well ?

 Grepping for "display =" in arch/arm/boot/dts/imx* I see that old
 bindings are also used by 3rd-party boards for imx6/7:
  * imx6sx-nitrogen6sx
  * imx6ul-geam
  * imx6ul-isiot
  * imx6ul-opos6uldev
  * imx6ul-pico-hobbit
  * imx6ul-tx6ul
  * imx7d-nitrogen7
>>>
>>> Er, yes, a handful of boards which could be updated :)
>>>
 Converting everything might be quite a bit of work, and explicitly
 supporting old bindings is also work.
>>>
>>> Does adding support for old bindings justify the effort invested ? I
>>> doubt so, it only adds more code to maintain.
>>>
 It is very confusing that there is a whole set of displays for imx6/7
 which are supported by upstream but only with a non-default config.
 While it is extremely common in the embedded field to have custom
 configs the default one in the kernel should try to "just work".

 Couldn't this patch series be considered a bugfix? It was also
 surprisingly small.
>>>
>>> I think it's just a workaround which allows you to postpone the real
>>> fix, and I don't like that.
>>
>> This is one of the situation where states quo is kinda the worst
>> situation.
>>
>> Currently imx_v6_v7_defconfig and mxs_defconfig actually still uses
>> CONFIG_FB_MXS.
>>
>> I understand that you'd rather prefer to move forward. I suggest we do
>> it in steps.
>>
>> In 4.19:
>>
>> - Change DRM driver.name to mxsfb-drm so we avoid conflicts for now
> 
> But this will break mesa if it depends on mxsfb name for ie. etnaviv
> binding.
> 
>> - Remove CONFIG_FB_MXS from imx_v6_v7_defconfig/mxs_defconfig now, and
>> only enable CONFIG_DRM_MXSFB=y
>> - Add (deprecated) to CONFIG_FB_MXS
>>
>> In 4.19/4.20:
>> - Fix the above device trees
>>
>> In 4.20/4.21:
>> - Remove FB_MXS
>>
>> Does that sound reasonable? If yes, I can send the patch set to do step
>> 1.
> 
> Can you fix the DTs for 4.19 too ?

Unfortunately updating the device trees turned out to be a non trivial
task especially as an outsider. The display needs to be supported in
drivers/gpu/drm/panel/panel-simple.c. Some displays might be already in
place, but if not, the display need to be added. Since for panel
bindings vendor and product information are needed, it is not possible
as an outsiders to make the conversion.

Jagan, Sebastien, Fabio, Lothar and Gary, could you maybe update the
respective device trees?

A conversion to the new bindings similar to commit a027d49fc193 ("ARM:
dts: imx7-colibri: use OF graph to describe the display") is what we are
looking for.

This will make sure that the boards keep working using the new MXSFB DRM
driver.

--
Stefan
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-07-12 Thread Stefan Agner
On 10.07.2018 11:11, Marek Vasut wrote:
> On 07/10/2018 11:06 AM, Stefan Agner wrote:
>> On 16.06.2018 01:32, Marek Vasut wrote:
>>> On 06/16/2018 12:42 AM, Leonard Crestez wrote:
 On Fri, 2018-06-15 at 23:36 +0200, Marek Vasut wrote:
> On 06/15/2018 10:58 PM, Leonard Crestez wrote:
>> On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
>>> On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
>>>  wrote:

 The FBDEV driver uses the same name and both can't be registered at the
 same time. Fix this by renaming the drm driver to mxsfb-drm
>>>
>>> Stefan sent the same patch a few days ago:
>>
>> In that thread there is a proposal for removing the old fbdev/mxsfb
>> driver entirely.
>>
>> That would break old DTBs, isn't this generally considered bad? Also,
>> are we sure the removal of fbdev/mxsfb wouldn't lose any features?
>>
>> What my series does is make both drivers work with the same kernel
>> image and turns the choice into a board-level dtb decision. Supporting
>> everything at once seems desirable to me and it allows for a very
>> smooth upgrade path.
>
> Having two drivers in the kernel with different set of bugs is always bad.
>
>> The old driver could be removed later, after all users are converted.
>
> Both drivers were in for long enough already. And let's be realistic,
> how many MX23/MX28 users of old DTs with new kernels are there who
> cannot update the DT as well ?

 Grepping for "display =" in arch/arm/boot/dts/imx* I see that old
 bindings are also used by 3rd-party boards for imx6/7:
  * imx6sx-nitrogen6sx
  * imx6ul-geam
  * imx6ul-isiot
  * imx6ul-opos6uldev
  * imx6ul-pico-hobbit
  * imx6ul-tx6ul
  * imx7d-nitrogen7
>>>
>>> Er, yes, a handful of boards which could be updated :)
>>>
 Converting everything might be quite a bit of work, and explicitly
 supporting old bindings is also work.
>>>
>>> Does adding support for old bindings justify the effort invested ? I
>>> doubt so, it only adds more code to maintain.
>>>
 It is very confusing that there is a whole set of displays for imx6/7
 which are supported by upstream but only with a non-default config.
 While it is extremely common in the embedded field to have custom
 configs the default one in the kernel should try to "just work".

 Couldn't this patch series be considered a bugfix? It was also
 surprisingly small.
>>>
>>> I think it's just a workaround which allows you to postpone the real
>>> fix, and I don't like that.
>>
>> This is one of the situation where states quo is kinda the worst
>> situation.
>>
>> Currently imx_v6_v7_defconfig and mxs_defconfig actually still uses
>> CONFIG_FB_MXS.
>>
>> I understand that you'd rather prefer to move forward. I suggest we do
>> it in steps.
>>
>> In 4.19:
>>
>> - Change DRM driver.name to mxsfb-drm so we avoid conflicts for now
> 
> But this will break mesa if it depends on mxsfb name for ie. etnaviv
> binding.
> 

Does it? grep -r -e mxsfb in libdrm and mesa master returns nothing.

There is also .name in struct drm_driver, which is already set to
mxsfb-drm... Is that the one exposed to user space?

>> - Remove CONFIG_FB_MXS from imx_v6_v7_defconfig/mxs_defconfig now, and
>> only enable CONFIG_DRM_MXSFB=y
>> - Add (deprecated) to CONFIG_FB_MXS
>>
>> In 4.19/4.20:
>> - Fix the above device trees
>>
>> In 4.20/4.21:
>> - Remove FB_MXS
>>
>> Does that sound reasonable? If yes, I can send the patch set to do step
>> 1.
> 
> Can you fix the DTs for 4.19 too ?

Getting tight, but will try.

--
Stefan
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-07-11 Thread Marek Vasut
On 07/10/2018 11:06 AM, Stefan Agner wrote:
> On 16.06.2018 01:32, Marek Vasut wrote:
>> On 06/16/2018 12:42 AM, Leonard Crestez wrote:
>>> On Fri, 2018-06-15 at 23:36 +0200, Marek Vasut wrote:
 On 06/15/2018 10:58 PM, Leonard Crestez wrote:
> On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
>> On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
>>  wrote:
>>>
>>> The FBDEV driver uses the same name and both can't be registered at the
>>> same time. Fix this by renaming the drm driver to mxsfb-drm
>>
>> Stefan sent the same patch a few days ago:
>
> In that thread there is a proposal for removing the old fbdev/mxsfb
> driver entirely.
>
> That would break old DTBs, isn't this generally considered bad? Also,
> are we sure the removal of fbdev/mxsfb wouldn't lose any features?
>
> What my series does is make both drivers work with the same kernel
> image and turns the choice into a board-level dtb decision. Supporting
> everything at once seems desirable to me and it allows for a very
> smooth upgrade path.

 Having two drivers in the kernel with different set of bugs is always bad.

> The old driver could be removed later, after all users are converted.

 Both drivers were in for long enough already. And let's be realistic,
 how many MX23/MX28 users of old DTs with new kernels are there who
 cannot update the DT as well ?
>>>
>>> Grepping for "display =" in arch/arm/boot/dts/imx* I see that old
>>> bindings are also used by 3rd-party boards for imx6/7:
>>>  * imx6sx-nitrogen6sx
>>>  * imx6ul-geam
>>>  * imx6ul-isiot
>>>  * imx6ul-opos6uldev
>>>  * imx6ul-pico-hobbit
>>>  * imx6ul-tx6ul
>>>  * imx7d-nitrogen7
>>
>> Er, yes, a handful of boards which could be updated :)
>>
>>> Converting everything might be quite a bit of work, and explicitly
>>> supporting old bindings is also work.
>>
>> Does adding support for old bindings justify the effort invested ? I
>> doubt so, it only adds more code to maintain.
>>
>>> It is very confusing that there is a whole set of displays for imx6/7
>>> which are supported by upstream but only with a non-default config.
>>> While it is extremely common in the embedded field to have custom
>>> configs the default one in the kernel should try to "just work".
>>>
>>> Couldn't this patch series be considered a bugfix? It was also
>>> surprisingly small.
>>
>> I think it's just a workaround which allows you to postpone the real
>> fix, and I don't like that.
> 
> This is one of the situation where states quo is kinda the worst
> situation.
> 
> Currently imx_v6_v7_defconfig and mxs_defconfig actually still uses
> CONFIG_FB_MXS.
> 
> I understand that you'd rather prefer to move forward. I suggest we do
> it in steps.
> 
> In 4.19:
> 
> - Change DRM driver.name to mxsfb-drm so we avoid conflicts for now

But this will break mesa if it depends on mxsfb name for ie. etnaviv
binding.

> - Remove CONFIG_FB_MXS from imx_v6_v7_defconfig/mxs_defconfig now, and
> only enable CONFIG_DRM_MXSFB=y
> - Add (deprecated) to CONFIG_FB_MXS
> 
> In 4.19/4.20:
> - Fix the above device trees
> 
> In 4.20/4.21:
> - Remove FB_MXS
> 
> Does that sound reasonable? If yes, I can send the patch set to do step
> 1.

Can you fix the DTs for 4.19 too ?

-- 
Best regards,
Marek Vasut
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-07-10 Thread Stefan Agner
On 16.06.2018 01:32, Marek Vasut wrote:
> On 06/16/2018 12:42 AM, Leonard Crestez wrote:
>> On Fri, 2018-06-15 at 23:36 +0200, Marek Vasut wrote:
>>> On 06/15/2018 10:58 PM, Leonard Crestez wrote:
 On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
> On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
>  wrote:
>>
>> The FBDEV driver uses the same name and both can't be registered at the
>> same time. Fix this by renaming the drm driver to mxsfb-drm
>
> Stefan sent the same patch a few days ago:

 In that thread there is a proposal for removing the old fbdev/mxsfb
 driver entirely.

 That would break old DTBs, isn't this generally considered bad? Also,
 are we sure the removal of fbdev/mxsfb wouldn't lose any features?

 What my series does is make both drivers work with the same kernel
 image and turns the choice into a board-level dtb decision. Supporting
 everything at once seems desirable to me and it allows for a very
 smooth upgrade path.
>>>
>>> Having two drivers in the kernel with different set of bugs is always bad.
>>>
 The old driver could be removed later, after all users are converted.
>>>
>>> Both drivers were in for long enough already. And let's be realistic,
>>> how many MX23/MX28 users of old DTs with new kernels are there who
>>> cannot update the DT as well ?
>>
>> Grepping for "display =" in arch/arm/boot/dts/imx* I see that old
>> bindings are also used by 3rd-party boards for imx6/7:
>>  * imx6sx-nitrogen6sx
>>  * imx6ul-geam
>>  * imx6ul-isiot
>>  * imx6ul-opos6uldev
>>  * imx6ul-pico-hobbit
>>  * imx6ul-tx6ul
>>  * imx7d-nitrogen7
> 
> Er, yes, a handful of boards which could be updated :)
> 
>> Converting everything might be quite a bit of work, and explicitly
>> supporting old bindings is also work.
> 
> Does adding support for old bindings justify the effort invested ? I
> doubt so, it only adds more code to maintain.
> 
>> It is very confusing that there is a whole set of displays for imx6/7
>> which are supported by upstream but only with a non-default config.
>> While it is extremely common in the embedded field to have custom
>> configs the default one in the kernel should try to "just work".
>>
>> Couldn't this patch series be considered a bugfix? It was also
>> surprisingly small.
> 
> I think it's just a workaround which allows you to postpone the real
> fix, and I don't like that.

This is one of the situation where states quo is kinda the worst
situation.

Currently imx_v6_v7_defconfig and mxs_defconfig actually still uses
CONFIG_FB_MXS.

I understand that you'd rather prefer to move forward. I suggest we do
it in steps.

In 4.19:

- Change DRM driver.name to mxsfb-drm so we avoid conflicts for now
- Remove CONFIG_FB_MXS from imx_v6_v7_defconfig/mxs_defconfig now, and
only enable CONFIG_DRM_MXSFB=y
- Add (deprecated) to CONFIG_FB_MXS

In 4.19/4.20:
- Fix the above device trees

In 4.20/4.21:
- Remove FB_MXS

Does that sound reasonable? If yes, I can send the patch set to do step
1.

--
Stefan
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-18 Thread Stefan Agner
On 18.06.2018 09:43, Daniel Vetter wrote:
> On Sat, Jun 16, 2018 at 01:32:44AM +0200, Marek Vasut wrote:
>> On 06/16/2018 12:42 AM, Leonard Crestez wrote:
>> > On Fri, 2018-06-15 at 23:36 +0200, Marek Vasut wrote:
>> >> On 06/15/2018 10:58 PM, Leonard Crestez wrote:
>> >>> On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
>>  On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
>>   wrote:
>> >
>> > The FBDEV driver uses the same name and both can't be registered at the
>> > same time. Fix this by renaming the drm driver to mxsfb-drm
>> 
>>  Stefan sent the same patch a few days ago:
>> >>>
>> >>> In that thread there is a proposal for removing the old fbdev/mxsfb
>> >>> driver entirely.
>> >>>
>> >>> That would break old DTBs, isn't this generally considered bad? Also,
>> >>> are we sure the removal of fbdev/mxsfb wouldn't lose any features?
>> >>>
>> >>> What my series does is make both drivers work with the same kernel
>> >>> image and turns the choice into a board-level dtb decision. Supporting
>> >>> everything at once seems desirable to me and it allows for a very
>> >>> smooth upgrade path.
>> >>
>> >> Having two drivers in the kernel with different set of bugs is always bad.
>> >>
>> >>> The old driver could be removed later, after all users are converted.
>> >>
>> >> Both drivers were in for long enough already. And let's be realistic,
>> >> how many MX23/MX28 users of old DTs with new kernels are there who
>> >> cannot update the DT as well ?
>> >
>> > Grepping for "display =" in arch/arm/boot/dts/imx* I see that old
>> > bindings are also used by 3rd-party boards for imx6/7:
>> >  * imx6sx-nitrogen6sx
>> >  * imx6ul-geam
>> >  * imx6ul-isiot
>> >  * imx6ul-opos6uldev
>> >  * imx6ul-pico-hobbit
>> >  * imx6ul-tx6ul
>> >  * imx7d-nitrogen7
>>
>> Er, yes, a handful of boards which could be updated :)
>>
>> > Converting everything might be quite a bit of work, and explicitly
>> > supporting old bindings is also work.
>>
>> Does adding support for old bindings justify the effort invested ? I
>> doubt so, it only adds more code to maintain.
>>
>> > It is very confusing that there is a whole set of displays for imx6/7
>> > which are supported by upstream but only with a non-default config.
>> > While it is extremely common in the embedded field to have custom
>> > configs the default one in the kernel should try to "just work".
>> >
>> > Couldn't this patch series be considered a bugfix? It was also
>> > surprisingly small.
>>
>> I think it's just a workaround which allows you to postpone the real
>> fix, and I don't like that.
> 
> Yeah agreed, imo the proper fix here would be to either update the dts for
> the affected boards and/or make mxsfb accept the old dt bindings for
> backwards compat. Artificially extending the life of the fbdev drivers
> seems silly.

We shouldn't have merged a DRM driver with a driver name which conflicts
with an existing driver... If anything, this is artificially shortening
the lifetime of the fbdev driver :-)

Again, I am ok with removing the driver. I just think it is silly to do
it just because of the conflicting driver name.

Maybe Sascha, original author of the mxs fbdev driver has an opinion on
this?

--
Stefan
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-18 Thread Daniel Vetter
On Sat, Jun 16, 2018 at 01:32:44AM +0200, Marek Vasut wrote:
> On 06/16/2018 12:42 AM, Leonard Crestez wrote:
> > On Fri, 2018-06-15 at 23:36 +0200, Marek Vasut wrote:
> >> On 06/15/2018 10:58 PM, Leonard Crestez wrote:
> >>> On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
>  On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
>   wrote:
> > 
> > The FBDEV driver uses the same name and both can't be registered at the
> > same time. Fix this by renaming the drm driver to mxsfb-drm
> 
>  Stefan sent the same patch a few days ago:
> >>>
> >>> In that thread there is a proposal for removing the old fbdev/mxsfb
> >>> driver entirely.
> >>>
> >>> That would break old DTBs, isn't this generally considered bad? Also,
> >>> are we sure the removal of fbdev/mxsfb wouldn't lose any features?
> >>>
> >>> What my series does is make both drivers work with the same kernel
> >>> image and turns the choice into a board-level dtb decision. Supporting
> >>> everything at once seems desirable to me and it allows for a very
> >>> smooth upgrade path.
> >>
> >> Having two drivers in the kernel with different set of bugs is always bad.
> >>
> >>> The old driver could be removed later, after all users are converted.
> >>
> >> Both drivers were in for long enough already. And let's be realistic,
> >> how many MX23/MX28 users of old DTs with new kernels are there who
> >> cannot update the DT as well ?
> > 
> > Grepping for "display =" in arch/arm/boot/dts/imx* I see that old
> > bindings are also used by 3rd-party boards for imx6/7:
> >  * imx6sx-nitrogen6sx
> >  * imx6ul-geam
> >  * imx6ul-isiot
> >  * imx6ul-opos6uldev
> >  * imx6ul-pico-hobbit
> >  * imx6ul-tx6ul
> >  * imx7d-nitrogen7
> 
> Er, yes, a handful of boards which could be updated :)
> 
> > Converting everything might be quite a bit of work, and explicitly
> > supporting old bindings is also work.
> 
> Does adding support for old bindings justify the effort invested ? I
> doubt so, it only adds more code to maintain.
> 
> > It is very confusing that there is a whole set of displays for imx6/7
> > which are supported by upstream but only with a non-default config.
> > While it is extremely common in the embedded field to have custom
> > configs the default one in the kernel should try to "just work".
> > 
> > Couldn't this patch series be considered a bugfix? It was also
> > surprisingly small.
> 
> I think it's just a workaround which allows you to postpone the real
> fix, and I don't like that.

Yeah agreed, imo the proper fix here would be to either update the dts for
the affected boards and/or make mxsfb accept the old dt bindings for
backwards compat. Artificially extending the life of the fbdev drivers
seems silly.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-16 Thread Marek Vasut
On 06/16/2018 12:42 AM, Leonard Crestez wrote:
> On Fri, 2018-06-15 at 23:36 +0200, Marek Vasut wrote:
>> On 06/15/2018 10:58 PM, Leonard Crestez wrote:
>>> On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
 On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
  wrote:
> 
> The FBDEV driver uses the same name and both can't be registered at the
> same time. Fix this by renaming the drm driver to mxsfb-drm

 Stefan sent the same patch a few days ago:
>>>
>>> In that thread there is a proposal for removing the old fbdev/mxsfb
>>> driver entirely.
>>>
>>> That would break old DTBs, isn't this generally considered bad? Also,
>>> are we sure the removal of fbdev/mxsfb wouldn't lose any features?
>>>
>>> What my series does is make both drivers work with the same kernel
>>> image and turns the choice into a board-level dtb decision. Supporting
>>> everything at once seems desirable to me and it allows for a very
>>> smooth upgrade path.
>>
>> Having two drivers in the kernel with different set of bugs is always bad.
>>
>>> The old driver could be removed later, after all users are converted.
>>
>> Both drivers were in for long enough already. And let's be realistic,
>> how many MX23/MX28 users of old DTs with new kernels are there who
>> cannot update the DT as well ?
> 
> Grepping for "display =" in arch/arm/boot/dts/imx* I see that old
> bindings are also used by 3rd-party boards for imx6/7:
>  * imx6sx-nitrogen6sx
>  * imx6ul-geam
>  * imx6ul-isiot
>  * imx6ul-opos6uldev
>  * imx6ul-pico-hobbit
>  * imx6ul-tx6ul
>  * imx7d-nitrogen7

Er, yes, a handful of boards which could be updated :)

> Converting everything might be quite a bit of work, and explicitly
> supporting old bindings is also work.

Does adding support for old bindings justify the effort invested ? I
doubt so, it only adds more code to maintain.

> It is very confusing that there is a whole set of displays for imx6/7
> which are supported by upstream but only with a non-default config.
> While it is extremely common in the embedded field to have custom
> configs the default one in the kernel should try to "just work".
> 
> Couldn't this patch series be considered a bugfix? It was also
> surprisingly small.

I think it's just a workaround which allows you to postpone the real
fix, and I don't like that.

-- 
Best regards,
Marek Vasut
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-16 Thread Leonard Crestez
On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:

> On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
>  wrote:
> > The FBDEV driver uses the same name and both can't be registered at the
> > same time. Fix this by renaming the drm driver to mxsfb-drm
> > 
> > Signed-off-by: Leonard Crestez 
> 
> Stefan sent the same patch a few days ago:
> http://www.spinics.net/lists/dri-devel/msg179489.html

In that thread there is a proposal for removing the old fbdev/mxsfb
driver entirely.

That would break old DTBs, isn't this generally considered bad? Also,
are we sure the removal of fbdev/mxsfb wouldn't lose any features?

What my series does is make both drivers work with the same kernel
image and turns the choice into a board-level dtb decision. Supporting
everything at once seems desirable to me and it allows for a very
smooth upgrade path.

The old driver could be removed later, after all users are converted.

--
Regards,
Leonard
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-16 Thread Marek Vasut
On 06/15/2018 10:58 PM, Leonard Crestez wrote:
> On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
> 
>> On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
>>  wrote:
>>> The FBDEV driver uses the same name and both can't be registered at the
>>> same time. Fix this by renaming the drm driver to mxsfb-drm
>>>
>>> Signed-off-by: Leonard Crestez 
>>
>> Stefan sent the same patch a few days ago:
>> http://www.spinics.net/lists/dri-devel/msg179489.html
> 
> In that thread there is a proposal for removing the old fbdev/mxsfb
> driver entirely.
> 
> That would break old DTBs, isn't this generally considered bad? Also,
> are we sure the removal of fbdev/mxsfb wouldn't lose any features?
> 
> What my series does is make both drivers work with the same kernel
> image and turns the choice into a board-level dtb decision. Supporting
> everything at once seems desirable to me and it allows for a very
> smooth upgrade path.

Having two drivers in the kernel with different set of bugs is always bad.

> The old driver could be removed later, after all users are converted.

Both drivers were in for long enough already. And let's be realistic,
how many MX23/MX28 users of old DTs with new kernels are there who
cannot update the DT as well ?

IMO keeping the old FBDEV driver in is just an excuse to postpone the
long overdue DT update and I dislike that. Update any remaining DTs and
nuke the FBDEV driver already.

-- 
Best regards,
Marek Vasut
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-16 Thread Marek Vasut
On 06/16/2018 12:22 AM, Fabio Estevam wrote:
> On Fri, Jun 15, 2018 at 6:36 PM, Marek Vasut  wrote:
> 
>> Having two drivers in the kernel with different set of bugs is always bad.
> 
> Sure, but breaking dtb's is also bad.

You picked only the first part of my argument, the less important one ;-)

> Can the mxsfb driver be modified to handle the old style bindings?

Maybe, but do we care ? Cfr my comment about the amount of users who
will be affected by this.

> The IPU drm driver is capable of handling both the old style where the
> display timing is passed in dts and the new drm style.
> 
> For example:
> 
> arch/arm/boot/dts/imx6qdl-sabresd.dtsi uses the drm style binding
> arch/arm/boot/dts/imx6qdl-sabreauto.dtsi uses the old style of passing
> the display timings in dts
> 
> Both formats are accepted by the ipu drm driver.
> 
> Can't mxsfb drm driver support both? Then we don't need to worry about
> breaking dtb's and could safely remove the mxs fbdev driver.

This might be a way forward, but again, does it justify the effort ?
We will be adding compatibility code which we will have to maintain for
maybe a handful of users I think.

-- 
Best regards,
Marek Vasut
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-16 Thread Leonard Crestez
On Fri, 2018-06-15 at 23:36 +0200, Marek Vasut wrote:
> On 06/15/2018 10:58 PM, Leonard Crestez wrote:
> > On Fri, 2018-06-15 at 16:47 -0300, Fabio Estevam wrote:
> > > On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
> > >  wrote:

> > > > The FBDEV driver uses the same name and both can't be registered at the
> > > > same time. Fix this by renaming the drm driver to mxsfb-drm
> > > 
> > > Stefan sent the same patch a few days ago:
> > 
> > In that thread there is a proposal for removing the old fbdev/mxsfb
> > driver entirely.
> > 
> > That would break old DTBs, isn't this generally considered bad? Also,
> > are we sure the removal of fbdev/mxsfb wouldn't lose any features?
> > 
> > What my series does is make both drivers work with the same kernel
> > image and turns the choice into a board-level dtb decision. Supporting
> > everything at once seems desirable to me and it allows for a very
> > smooth upgrade path.
> 
> Having two drivers in the kernel with different set of bugs is always bad.
> 
> > The old driver could be removed later, after all users are converted.
> 
> Both drivers were in for long enough already. And let's be realistic,
> how many MX23/MX28 users of old DTs with new kernels are there who
> cannot update the DT as well ?

Grepping for "display =" in arch/arm/boot/dts/imx* I see that old
bindings are also used by 3rd-party boards for imx6/7:
 * imx6sx-nitrogen6sx
 * imx6ul-geam
 * imx6ul-isiot
 * imx6ul-opos6uldev
 * imx6ul-pico-hobbit
 * imx6ul-tx6ul
 * imx7d-nitrogen7

Converting everything might be quite a bit of work, and explicitly
supporting old bindings is also work.

It is very confusing that there is a whole set of displays for imx6/7
which are supported by upstream but only with a non-default config.
While it is extremely common in the embedded field to have custom
configs the default one in the kernel should try to "just work".

Couldn't this patch series be considered a bugfix? It was also
surprisingly small.

--
Regards,
Leonard
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-15 Thread Fabio Estevam
On Fri, Jun 15, 2018 at 6:36 PM, Marek Vasut  wrote:

> Having two drivers in the kernel with different set of bugs is always bad.

Sure, but breaking dtb's is also bad.

Can the mxsfb driver be modified to handle the old style bindings?

The IPU drm driver is capable of handling both the old style where the
display timing is passed in dts and the new drm style.

For example:

arch/arm/boot/dts/imx6qdl-sabresd.dtsi uses the drm style binding
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi uses the old style of passing
the display timings in dts

Both formats are accepted by the ipu drm driver.

Can't mxsfb drm driver support both? Then we don't need to worry about
breaking dtb's and could safely remove the mxs fbdev driver.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-15 Thread Fabio Estevam
On Fri, Jun 15, 2018 at 5:58 PM, Leonard Crestez
 wrote:

> In that thread there is a proposal for removing the old fbdev/mxsfb
> driver entirely.
>
> That would break old DTBs, isn't this generally considered bad? Also,
> are we sure the removal of fbdev/mxsfb wouldn't lose any features?

Yes, I also think we should not break old dtb's.

> What my series does is make both drivers work with the same kernel
> image and turns the choice into a board-level dtb decision. Supporting
> everything at once seems desirable to me and it allows for a very
> smooth upgrade path.
>
> The old driver could be removed later, after all users are converted.

Agreed.

Maybe the mxs fbdev driver needs to warn users saying that that the
driver is deprecated and the bindings need to be updated to the DRM
bindings style.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/3] drm: mxsfb: Change driver.name to mxsfb-drm

2018-06-15 Thread Fabio Estevam
Hi Leonard,

On Fri, Jun 15, 2018 at 4:43 PM, Leonard Crestez
 wrote:
> The FBDEV driver uses the same name and both can't be registered at the
> same time. Fix this by renaming the drm driver to mxsfb-drm
>
> Signed-off-by: Leonard Crestez 

Stefan sent the same patch a few days ago:
https://www.spinics.net/lists/dri-devel/msg179489.html
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel