All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/pl111: Fix regression from fbdev CMA helper
@ 2018-02-12 12:40 ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2018-02-12 12:40 UTC (permalink / raw)
  To: linux-arm-kernel

Commit d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
refactored the driver to use fbdev handling in the core, but
mistakedly limited the number of maximum connections to 0.

Predictably, zero possible connections also gives zero
framebuffers when using the system. So let's bump it to 1 so
we get our framebuffer back.

Cc: Noralf Tr?nnes <noralf@tronnes.org>
Cc: Eric Anholt <eric@anholt.net>
Fixes: d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpu/drm/pl111/pl111_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
index acb738c69873..306ac7cabd90 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -138,7 +138,7 @@ static int pl111_modeset_init(struct drm_device *dev)
 
 	drm_mode_config_reset(dev);
 
-	drm_fb_cma_fbdev_init(dev, 32, 0);
+	drm_fb_cma_fbdev_init(dev, 32, 1);
 
 	drm_kms_helper_poll_init(dev);
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] drm/pl111: Fix regression from fbdev CMA helper
@ 2018-02-12 12:40 ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2018-02-12 12:40 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula, Sean Paul, Eric Anholt
  Cc: linux-arm-kernel, dri-devel

Commit d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
refactored the driver to use fbdev handling in the core, but
mistakedly limited the number of maximum connections to 0.

Predictably, zero possible connections also gives zero
framebuffers when using the system. So let's bump it to 1 so
we get our framebuffer back.

Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Eric Anholt <eric@anholt.net>
Fixes: d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpu/drm/pl111/pl111_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
index acb738c69873..306ac7cabd90 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -138,7 +138,7 @@ static int pl111_modeset_init(struct drm_device *dev)
 
 	drm_mode_config_reset(dev);
 
-	drm_fb_cma_fbdev_init(dev, 32, 0);
+	drm_fb_cma_fbdev_init(dev, 32, 1);
 
 	drm_kms_helper_poll_init(dev);
 
-- 
2.14.3

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] drm/pl111: Fix regression from fbdev CMA helper
  2018-02-12 12:40 ` Linus Walleij
@ 2018-02-12 13:42   ` Noralf Trønnes
  -1 siblings, 0 replies; 10+ messages in thread
From: Noralf Trønnes @ 2018-02-12 13:42 UTC (permalink / raw)
  To: linux-arm-kernel


Den 12.02.2018 13.40, skrev Linus Walleij:
> Commit d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
> refactored the driver to use fbdev handling in the core, but
> mistakedly limited the number of maximum connections to 0.
>
> Predictably, zero possible connections also gives zero
> framebuffers when using the system. So let's bump it to 1 so
> we get our framebuffer back.
>
> Cc: Noralf Tr?nnes <noralf@tronnes.org>
> Cc: Eric Anholt <eric@anholt.net>
> Fixes: d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>   drivers/gpu/drm/pl111/pl111_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
> index acb738c69873..306ac7cabd90 100644
> --- a/drivers/gpu/drm/pl111/pl111_drv.c
> +++ b/drivers/gpu/drm/pl111/pl111_drv.c
> @@ -138,7 +138,7 @@ static int pl111_modeset_init(struct drm_device *dev)
>   
>   	drm_mode_config_reset(dev);
>   
> -	drm_fb_cma_fbdev_init(dev, 32, 0);
> +	drm_fb_cma_fbdev_init(dev, 32, 1);
>   
>   	drm_kms_helper_poll_init(dev);
>   

Sorry about that.

I don't know how bridges work, but since it doesn't work this means that
there's no connector available at this point?

This is the arg docs:

 ?* @max_conn_count: Maximum number of connectors.
 ?*????????????????? @dev->mode_config.num_connector is used if this is 
zero.

Anyways:
Acked-by: Noralf Tr?nnes <noralf@tronnes.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/pl111: Fix regression from fbdev CMA helper
@ 2018-02-12 13:42   ` Noralf Trønnes
  0 siblings, 0 replies; 10+ messages in thread
From: Noralf Trønnes @ 2018-02-12 13:42 UTC (permalink / raw)
  To: Linus Walleij, Daniel Vetter, Jani Nikula, Sean Paul, Eric Anholt
  Cc: linux-arm-kernel, dri-devel


Den 12.02.2018 13.40, skrev Linus Walleij:
> Commit d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
> refactored the driver to use fbdev handling in the core, but
> mistakedly limited the number of maximum connections to 0.
>
> Predictably, zero possible connections also gives zero
> framebuffers when using the system. So let's bump it to 1 so
> we get our framebuffer back.
>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Cc: Eric Anholt <eric@anholt.net>
> Fixes: d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>   drivers/gpu/drm/pl111/pl111_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
> index acb738c69873..306ac7cabd90 100644
> --- a/drivers/gpu/drm/pl111/pl111_drv.c
> +++ b/drivers/gpu/drm/pl111/pl111_drv.c
> @@ -138,7 +138,7 @@ static int pl111_modeset_init(struct drm_device *dev)
>   
>   	drm_mode_config_reset(dev);
>   
> -	drm_fb_cma_fbdev_init(dev, 32, 0);
> +	drm_fb_cma_fbdev_init(dev, 32, 1);
>   
>   	drm_kms_helper_poll_init(dev);
>   

Sorry about that.

I don't know how bridges work, but since it doesn't work this means that
there's no connector available at this point?

This is the arg docs:

  * @max_conn_count: Maximum number of connectors.
  *                  @dev->mode_config.num_connector is used if this is 
zero.

Anyways:
Acked-by: Noralf Trønnes <noralf@tronnes.org>

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] drm/pl111: Fix regression from fbdev CMA helper
  2018-02-12 13:42   ` Noralf Trønnes
@ 2018-02-12 14:01     ` Noralf Trønnes
  -1 siblings, 0 replies; 10+ messages in thread
From: Noralf Trønnes @ 2018-02-12 14:01 UTC (permalink / raw)
  To: linux-arm-kernel


Den 12.02.2018 14.42, skrev Noralf Tr?nnes:
>
> Den 12.02.2018 13.40, skrev Linus Walleij:
>> Commit d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
>> refactored the driver to use fbdev handling in the core, but
>> mistakedly limited the number of maximum connections to 0.
>>
>> Predictably, zero possible connections also gives zero
>> framebuffers when using the system. So let's bump it to 1 so
>> we get our framebuffer back.
>>
>> Cc: Noralf Tr?nnes <noralf@tronnes.org>
>> Cc: Eric Anholt <eric@anholt.net>
>> Fixes: d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> ? drivers/gpu/drm/pl111/pl111_drv.c | 2 +-
>> ? 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/pl111/pl111_drv.c 
>> b/drivers/gpu/drm/pl111/pl111_drv.c
>> index acb738c69873..306ac7cabd90 100644
>> --- a/drivers/gpu/drm/pl111/pl111_drv.c
>> +++ b/drivers/gpu/drm/pl111/pl111_drv.c
>> @@ -138,7 +138,7 @@ static int pl111_modeset_init(struct drm_device 
>> *dev)
>> ? ????? drm_mode_config_reset(dev);
>> ? -??? drm_fb_cma_fbdev_init(dev, 32, 0);
>> +??? drm_fb_cma_fbdev_init(dev, 32, 1);
>> ? ????? drm_kms_helper_poll_init(dev);
>
> Sorry about that.
>
> I don't know how bridges work, but since it doesn't work this means that
> there's no connector available at this point?
>
> This is the arg docs:
>
> ?* @max_conn_count: Maximum number of connectors.
> ?*????????????????? @dev->mode_config.num_connector is used if this is 
> zero.
>
> Anyways:
> Acked-by: Noralf Tr?nnes <noralf@tronnes.org>
>

I forgot to look at the change, and I don't understand how this broke 
anything,

drm/pl111: Use drm_fb_cma_fbdev_init/fini():

@@ -137,8 +138,7 @@ static int pl111_modeset_init(struct drm_device *dev)

 ???? drm_mode_config_reset(dev);

-??? priv->fbdev = drm_fbdev_cma_init(dev, 32,
-??? ??? ??? ??? ??? ?dev->mode_config.num_connector);
+??? drm_fb_cma_fbdev_init(dev, 32, 0);

 ???? drm_kms_helper_poll_init(dev);

New max_conn_count setting:

int drm_fb_cma_fbdev_init(struct drm_device *dev, unsigned int 
preferred_bpp,
 ??? ??? ??? ? unsigned int max_conn_count)
{
 ??? return drm_fb_cma_fbdev_init_with_funcs(dev, preferred_bpp,
 ??? ??? ??? ??? ??? ??? max_conn_count, NULL);
}

int drm_fb_cma_fbdev_init_with_funcs(struct drm_device *dev,
 ??? unsigned int preferred_bpp, unsigned int max_conn_count,
 ??? const struct drm_framebuffer_funcs *funcs)
{
...
 ??? if (!max_conn_count)
 ??? ??? max_conn_count = dev->mode_config.num_connector;

Noralf.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/pl111: Fix regression from fbdev CMA helper
@ 2018-02-12 14:01     ` Noralf Trønnes
  0 siblings, 0 replies; 10+ messages in thread
From: Noralf Trønnes @ 2018-02-12 14:01 UTC (permalink / raw)
  To: Linus Walleij, Daniel Vetter, Jani Nikula, Sean Paul, Eric Anholt
  Cc: dri-devel, linux-arm-kernel


Den 12.02.2018 14.42, skrev Noralf Trønnes:
>
> Den 12.02.2018 13.40, skrev Linus Walleij:
>> Commit d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
>> refactored the driver to use fbdev handling in the core, but
>> mistakedly limited the number of maximum connections to 0.
>>
>> Predictably, zero possible connections also gives zero
>> framebuffers when using the system. So let's bump it to 1 so
>> we get our framebuffer back.
>>
>> Cc: Noralf Trønnes <noralf@tronnes.org>
>> Cc: Eric Anholt <eric@anholt.net>
>> Fixes: d18df744de1a ("drm/pl111: Use drm_fb_cma_fbdev_init/fini()")
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>>   drivers/gpu/drm/pl111/pl111_drv.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/pl111/pl111_drv.c 
>> b/drivers/gpu/drm/pl111/pl111_drv.c
>> index acb738c69873..306ac7cabd90 100644
>> --- a/drivers/gpu/drm/pl111/pl111_drv.c
>> +++ b/drivers/gpu/drm/pl111/pl111_drv.c
>> @@ -138,7 +138,7 @@ static int pl111_modeset_init(struct drm_device 
>> *dev)
>>         drm_mode_config_reset(dev);
>>   -    drm_fb_cma_fbdev_init(dev, 32, 0);
>> +    drm_fb_cma_fbdev_init(dev, 32, 1);
>>         drm_kms_helper_poll_init(dev);
>
> Sorry about that.
>
> I don't know how bridges work, but since it doesn't work this means that
> there's no connector available at this point?
>
> This is the arg docs:
>
>  * @max_conn_count: Maximum number of connectors.
>  *                  @dev->mode_config.num_connector is used if this is 
> zero.
>
> Anyways:
> Acked-by: Noralf Trønnes <noralf@tronnes.org>
>

I forgot to look at the change, and I don't understand how this broke 
anything,

drm/pl111: Use drm_fb_cma_fbdev_init/fini():

@@ -137,8 +138,7 @@ static int pl111_modeset_init(struct drm_device *dev)

      drm_mode_config_reset(dev);

-    priv->fbdev = drm_fbdev_cma_init(dev, 32,
-                     dev->mode_config.num_connector);
+    drm_fb_cma_fbdev_init(dev, 32, 0);

      drm_kms_helper_poll_init(dev);

New max_conn_count setting:

int drm_fb_cma_fbdev_init(struct drm_device *dev, unsigned int 
preferred_bpp,
               unsigned int max_conn_count)
{
     return drm_fb_cma_fbdev_init_with_funcs(dev, preferred_bpp,
                         max_conn_count, NULL);
}

int drm_fb_cma_fbdev_init_with_funcs(struct drm_device *dev,
     unsigned int preferred_bpp, unsigned int max_conn_count,
     const struct drm_framebuffer_funcs *funcs)
{
...
     if (!max_conn_count)
         max_conn_count = dev->mode_config.num_connector;

Noralf.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] drm/pl111: Fix regression from fbdev CMA helper
  2018-02-12 14:01     ` Noralf Trønnes
@ 2018-02-12 15:53       ` Linus Walleij
  -1 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2018-02-12 15:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 12, 2018 at 3:01 PM, Noralf Tr?nnes <noralf@tronnes.org> wrote:
> Den 12.02.2018 14.42, skrev Noralf Tr?nnes:
>> Den 12.02.2018 13.40, skrev Linus Walleij:

>>>         drm_mode_config_reset(dev);
>>>   -    drm_fb_cma_fbdev_init(dev, 32, 0);
>>> +    drm_fb_cma_fbdev_init(dev, 32, 1);
>>>         drm_kms_helper_poll_init(dev);

(...)

> I forgot to look at the change, and I don't understand how this broke
> anything,

My wrong.

I had some old codepaths in my out-of-tree stuff (sorry
the only thing that makes the hardware work...).

I was using the old drm_fbdev_cma_init() which isn't
as helpful as the new drm_fb_cma_fbdev_init() but
as the old function is still there it all just "worked"
except for this...

Theres is some confusion with these similarly named
functions :D

Sorry for the fuzz, I fixed my patch set to use the new
function now.

Let's just drop this patch.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/pl111: Fix regression from fbdev CMA helper
@ 2018-02-12 15:53       ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2018-02-12 15:53 UTC (permalink / raw)
  To: Noralf Trønnes; +Cc: open list:DRM PANEL DRIVERS, Daniel Vetter, Linux ARM

On Mon, Feb 12, 2018 at 3:01 PM, Noralf Trønnes <noralf@tronnes.org> wrote:
> Den 12.02.2018 14.42, skrev Noralf Trønnes:
>> Den 12.02.2018 13.40, skrev Linus Walleij:

>>>         drm_mode_config_reset(dev);
>>>   -    drm_fb_cma_fbdev_init(dev, 32, 0);
>>> +    drm_fb_cma_fbdev_init(dev, 32, 1);
>>>         drm_kms_helper_poll_init(dev);

(...)

> I forgot to look at the change, and I don't understand how this broke
> anything,

My wrong.

I had some old codepaths in my out-of-tree stuff (sorry
the only thing that makes the hardware work...).

I was using the old drm_fbdev_cma_init() which isn't
as helpful as the new drm_fb_cma_fbdev_init() but
as the old function is still there it all just "worked"
except for this...

Theres is some confusion with these similarly named
functions :D

Sorry for the fuzz, I fixed my patch set to use the new
function now.

Let's just drop this patch.

Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] drm/pl111: Fix regression from fbdev CMA helper
  2018-02-12 15:53       ` Linus Walleij
@ 2018-02-12 16:02         ` Noralf Trønnes
  -1 siblings, 0 replies; 10+ messages in thread
From: Noralf Trønnes @ 2018-02-12 16:02 UTC (permalink / raw)
  To: linux-arm-kernel


Den 12.02.2018 16.53, skrev Linus Walleij:
> On Mon, Feb 12, 2018 at 3:01 PM, Noralf Tr?nnes <noralf@tronnes.org> wrote:
>> Den 12.02.2018 14.42, skrev Noralf Tr?nnes:
>>> Den 12.02.2018 13.40, skrev Linus Walleij:
>>>>          drm_mode_config_reset(dev);
>>>>    -    drm_fb_cma_fbdev_init(dev, 32, 0);
>>>> +    drm_fb_cma_fbdev_init(dev, 32, 1);
>>>>          drm_kms_helper_poll_init(dev);
> (...)
>
>> I forgot to look at the change, and I don't understand how this broke
>> anything,
> My wrong.
>
> I had some old codepaths in my out-of-tree stuff (sorry
> the only thing that makes the hardware work...).
>
> I was using the old drm_fbdev_cma_init() which isn't
> as helpful as the new drm_fb_cma_fbdev_init() but
> as the old function is still there it all just "worked"
> except for this...
>
> Theres is some confusion with these similarly named
> functions :D

Yeah, that's my doing :-/
I have yet to do the final cleanup to remove struct drm_fbdev_cma.
If the generic fbdev emulation that I'm working on turns out good,
then it's possible to entirely drop fbdev code from many drivers.
Hence the waiting.

> Sorry for the fuzz, I fixed my patch set to use the new
> function now.

No problem.

Noralf.

>
> Let's just drop this patch.
>
> Yours,
> Linus Walleij
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/pl111: Fix regression from fbdev CMA helper
@ 2018-02-12 16:02         ` Noralf Trønnes
  0 siblings, 0 replies; 10+ messages in thread
From: Noralf Trønnes @ 2018-02-12 16:02 UTC (permalink / raw)
  To: Linus Walleij; +Cc: open list:DRM PANEL DRIVERS, Daniel Vetter, Linux ARM


Den 12.02.2018 16.53, skrev Linus Walleij:
> On Mon, Feb 12, 2018 at 3:01 PM, Noralf Trønnes <noralf@tronnes.org> wrote:
>> Den 12.02.2018 14.42, skrev Noralf Trønnes:
>>> Den 12.02.2018 13.40, skrev Linus Walleij:
>>>>          drm_mode_config_reset(dev);
>>>>    -    drm_fb_cma_fbdev_init(dev, 32, 0);
>>>> +    drm_fb_cma_fbdev_init(dev, 32, 1);
>>>>          drm_kms_helper_poll_init(dev);
> (...)
>
>> I forgot to look at the change, and I don't understand how this broke
>> anything,
> My wrong.
>
> I had some old codepaths in my out-of-tree stuff (sorry
> the only thing that makes the hardware work...).
>
> I was using the old drm_fbdev_cma_init() which isn't
> as helpful as the new drm_fb_cma_fbdev_init() but
> as the old function is still there it all just "worked"
> except for this...
>
> Theres is some confusion with these similarly named
> functions :D

Yeah, that's my doing :-/
I have yet to do the final cleanup to remove struct drm_fbdev_cma.
If the generic fbdev emulation that I'm working on turns out good,
then it's possible to entirely drop fbdev code from many drivers.
Hence the waiting.

> Sorry for the fuzz, I fixed my patch set to use the new
> function now.

No problem.

Noralf.

>
> Let's just drop this patch.
>
> Yours,
> Linus Walleij
>

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-02-12 16:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 12:40 [PATCH] drm/pl111: Fix regression from fbdev CMA helper Linus Walleij
2018-02-12 12:40 ` Linus Walleij
2018-02-12 13:42 ` Noralf Trønnes
2018-02-12 13:42   ` Noralf Trønnes
2018-02-12 14:01   ` Noralf Trønnes
2018-02-12 14:01     ` Noralf Trønnes
2018-02-12 15:53     ` Linus Walleij
2018-02-12 15:53       ` Linus Walleij
2018-02-12 16:02       ` Noralf Trønnes
2018-02-12 16:02         ` Noralf Trønnes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.