Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-21 Thread Jani Nikula
On Thu, 21 Jan 2021, Fabio Estevam  wrote:
> On Thu, Jan 21, 2021 at 9:10 AM Jani Nikula  wrote:
>
>> Kinda catch-22 because next has dropped current drm-intel-next because
>> it doesn't build because of the issue this patch fixes. ;)
>
> Ok, so I built drm-intel-next and I was able to reproduce the buid
> error as reported by Stephen.
>
> Applied this patch and it builds fine now.

Thanks, much appreciated.

Pushed to drm-intel-next.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-21 Thread Fabio Estevam
On Thu, Jan 21, 2021 at 9:10 AM Jani Nikula  wrote:

> Kinda catch-22 because next has dropped current drm-intel-next because
> it doesn't build because of the issue this patch fixes. ;)

Ok, so I built drm-intel-next and I was able to reproduce the buid
error as reported by Stephen.

Applied this patch and it builds fine now.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-21 Thread Jani Nikula
On Thu, 21 Jan 2021, Fabio Estevam  wrote:
> On Thu, Jan 21, 2021 at 8:41 AM Jani Nikula  wrote:
>
>> On top of what? Current drm-tip?
>
> It was on top of next-20210121.

Kinda catch-22 because next has dropped current drm-intel-next because
it doesn't build because of the issue this patch fixes. ;)

BR,
Jani.

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

-- 
Jani Nikula, Intel Open Source Graphics Center
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-21 Thread Fabio Estevam
On Thu, Jan 21, 2021 at 8:41 AM Jani Nikula  wrote:

> On top of what? Current drm-tip?

It was on top of next-20210121.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-21 Thread Jani Nikula
On Thu, 21 Jan 2021, Fabio Estevam  wrote:
> Hi Jani,
>
> On Thu, Jan 21, 2021 at 8:22 AM Jani Nikula  wrote:
>
>> Sean, Rob, or anyone with an arm toolchain for msm available, could I
>> trouble you to build test this please?
>
> I tried to build after applying your patch:

On top of what? Current drm-tip?

BR,
Jani.



>
>   CC  drivers/gpu/drm/msm/dp/dp_ctrl.o
> drivers/gpu/drm/msm/dp/dp_ctrl.c: In function ‘dp_ctrl_use_fixed_nvid’:
> drivers/gpu/drm/msm/dp/dp_ctrl.c:1429:11: error: too few arguments to
> function ‘drm_dp_has_quirk’
>  1429 |   return (drm_dp_has_quirk(>panel->desc,
>   |   ^~~~
> In file included from drivers/gpu/drm/msm/dp/dp_ctrl.c:15:
> ./include/drm/drm_dp_helper.h:2101:1: note: declared here
>  2101 | drm_dp_has_quirk(const struct drm_dp_desc *desc, u32 edid_quirks,
>   | ^~~~
> make[4]: *** [scripts/Makefile.build:287:
> drivers/gpu/drm/msm/dp/dp_ctrl.o] Error 1
> make[3]: *** [scripts/Makefile.build:530: drivers/gpu/drm/msm] Error 2
> make[2]: *** [scripts/Makefile.build:530: drivers/gpu/drm] Error 2
> make[1]: *** [scripts/Makefile.build:530: drivers/gpu] Error 2
> make: *** [Makefile:1819: drivers] Error 2
>
> I had to add the extra parameter like this:
>
> --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
> +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> @@ -1420,16 +1420,14 @@ void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl)
>  static bool dp_ctrl_use_fixed_nvid(struct dp_ctrl_private *ctrl)
>  {
> u8 *dpcd = ctrl->panel->dpcd;
> -   u32 edid_quirks = 0;
>
> -   edid_quirks = drm_dp_get_edid_quirks(ctrl->panel->edid);
> /*
>  * For better interop experience, used a fixed NVID=0x8000
>  * whenever connected to a VGA dongle downstream.
>  */
> if (drm_dp_is_branch(dpcd))
> -   return (drm_dp_has_quirk(>panel->desc, edid_quirks,
> -   DP_DPCD_QUIRK_CONSTANT_N));
> +   return (drm_dp_has_quirk(>panel->desc, 0,
> +DP_DPCD_QUIRK_CONSTANT_N));
>
> return false;
>  }
>
> and then it builds.

-- 
Jani Nikula, Intel Open Source Graphics Center
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-21 Thread Fabio Estevam
Hi Jani,

On Thu, Jan 21, 2021 at 8:22 AM Jani Nikula  wrote:

> Sean, Rob, or anyone with an arm toolchain for msm available, could I
> trouble you to build test this please?

I tried to build after applying your patch:

  CC  drivers/gpu/drm/msm/dp/dp_ctrl.o
drivers/gpu/drm/msm/dp/dp_ctrl.c: In function ‘dp_ctrl_use_fixed_nvid’:
drivers/gpu/drm/msm/dp/dp_ctrl.c:1429:11: error: too few arguments to
function ‘drm_dp_has_quirk’
 1429 |   return (drm_dp_has_quirk(>panel->desc,
  |   ^~~~
In file included from drivers/gpu/drm/msm/dp/dp_ctrl.c:15:
./include/drm/drm_dp_helper.h:2101:1: note: declared here
 2101 | drm_dp_has_quirk(const struct drm_dp_desc *desc, u32 edid_quirks,
  | ^~~~
make[4]: *** [scripts/Makefile.build:287:
drivers/gpu/drm/msm/dp/dp_ctrl.o] Error 1
make[3]: *** [scripts/Makefile.build:530: drivers/gpu/drm/msm] Error 2
make[2]: *** [scripts/Makefile.build:530: drivers/gpu/drm] Error 2
make[1]: *** [scripts/Makefile.build:530: drivers/gpu] Error 2
make: *** [Makefile:1819: drivers] Error 2

I had to add the extra parameter like this:

--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -1420,16 +1420,14 @@ void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl)
 static bool dp_ctrl_use_fixed_nvid(struct dp_ctrl_private *ctrl)
 {
u8 *dpcd = ctrl->panel->dpcd;
-   u32 edid_quirks = 0;

-   edid_quirks = drm_dp_get_edid_quirks(ctrl->panel->edid);
/*
 * For better interop experience, used a fixed NVID=0x8000
 * whenever connected to a VGA dongle downstream.
 */
if (drm_dp_is_branch(dpcd))
-   return (drm_dp_has_quirk(>panel->desc, edid_quirks,
-   DP_DPCD_QUIRK_CONSTANT_N));
+   return (drm_dp_has_quirk(>panel->desc, 0,
+DP_DPCD_QUIRK_CONSTANT_N));

return false;
 }

and then it builds.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-21 Thread Jani Nikula
On Wed, 20 Jan 2021, Lyude Paul  wrote:
> Reviewed-by: Lyude Paul 

Thanks for the review.

Sean, Rob, or anyone with an arm toolchain for msm available, could I
trouble you to build test this please?


BR,
Jani.


>
> On Wed, 2021-01-20 at 13:07 +0200, Jani Nikula wrote:
>> Commit 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based
>> quirks"") removed drm_dp_get_edid_quirks() and changed the signature of
>> drm_dp_has_quirk() while they were still being used in msm. Fix the
>> breakage. Functionally, removing the EDID-based quirks has no impact on
>> msm.
>> 
>> [The above commit was merged to drm-intel-next; make two wrongs a right
>> by merging this fix through drm-intel-next as well.]
>> 
>> Reported-by: Stephen Rothwell 
>> References:
>> http://lore.kernel.org/r/20210120105715.4391d...@canb.auug.org.au
>> Fixes: 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based quirks"")
>> Cc: Lyude Paul 
>> Acked-by: Daniel Vetter 
>> Cc: Rob Clark 
>> Cc: Sean Paul 
>> Cc: dri-devel@lists.freedesktop.org
>> Signed-off-by: Jani Nikula 
>> 
>> ---
>> 
>> Note: I admit to not even build testing this one. I'd need a config,
>> possibly also a toolchain setup for that.
>> ---
>>  drivers/gpu/drm/msm/dp/dp_ctrl.c | 6 ++
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> b/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> index e3462f5d96d7..36b39c381b3f 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> @@ -1420,16 +1420,14 @@ void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl)
>>  static bool dp_ctrl_use_fixed_nvid(struct dp_ctrl_private *ctrl)
>>  {
>> u8 *dpcd = ctrl->panel->dpcd;
>> -   u32 edid_quirks = 0;
>>  
>> -   edid_quirks = drm_dp_get_edid_quirks(ctrl->panel->edid);
>> /*
>>  * For better interop experience, used a fixed NVID=0x8000
>>  * whenever connected to a VGA dongle downstream.
>>  */
>> if (drm_dp_is_branch(dpcd))
>> -   return (drm_dp_has_quirk(>panel->desc, edid_quirks,
>> -   DP_DPCD_QUIRK_CONSTANT_N));
>> +   return (drm_dp_has_quirk(>panel->desc,
>> +    DP_DPCD_QUIRK_CONSTANT_N));
>>  
>> return false;
>>  }

-- 
Jani Nikula, Intel Open Source Graphics Center
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-20 Thread Lyude Paul
Reviewed-by: Lyude Paul 

On Wed, 2021-01-20 at 13:07 +0200, Jani Nikula wrote:
> Commit 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based
> quirks"") removed drm_dp_get_edid_quirks() and changed the signature of
> drm_dp_has_quirk() while they were still being used in msm. Fix the
> breakage. Functionally, removing the EDID-based quirks has no impact on
> msm.
> 
> [The above commit was merged to drm-intel-next; make two wrongs a right
> by merging this fix through drm-intel-next as well.]
> 
> Reported-by: Stephen Rothwell 
> References:
> http://lore.kernel.org/r/20210120105715.4391d...@canb.auug.org.au
> Fixes: 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based quirks"")
> Cc: Lyude Paul 
> Acked-by: Daniel Vetter 
> Cc: Rob Clark 
> Cc: Sean Paul 
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Jani Nikula 
> 
> ---
> 
> Note: I admit to not even build testing this one. I'd need a config,
> possibly also a toolchain setup for that.
> ---
>  drivers/gpu/drm/msm/dp/dp_ctrl.c | 6 ++
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c
> b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> index e3462f5d96d7..36b39c381b3f 100644
> --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
> +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> @@ -1420,16 +1420,14 @@ void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl)
>  static bool dp_ctrl_use_fixed_nvid(struct dp_ctrl_private *ctrl)
>  {
> u8 *dpcd = ctrl->panel->dpcd;
> -   u32 edid_quirks = 0;
>  
> -   edid_quirks = drm_dp_get_edid_quirks(ctrl->panel->edid);
> /*
>  * For better interop experience, used a fixed NVID=0x8000
>  * whenever connected to a VGA dongle downstream.
>  */
> if (drm_dp_is_branch(dpcd))
> -   return (drm_dp_has_quirk(>panel->desc, edid_quirks,
> -   DP_DPCD_QUIRK_CONSTANT_N));
> +   return (drm_dp_has_quirk(>panel->desc,
> +    DP_DPCD_QUIRK_CONSTANT_N));
>  
> return false;
>  }

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat

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


[PATCH] drm/msm/dp: fix build after dp quirk helper change

2021-01-20 Thread Jani Nikula
Commit 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based
quirks"") removed drm_dp_get_edid_quirks() and changed the signature of
drm_dp_has_quirk() while they were still being used in msm. Fix the
breakage. Functionally, removing the EDID-based quirks has no impact on
msm.

[The above commit was merged to drm-intel-next; make two wrongs a right
by merging this fix through drm-intel-next as well.]

Reported-by: Stephen Rothwell 
References: http://lore.kernel.org/r/20210120105715.4391d...@canb.auug.org.au
Fixes: 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based quirks"")
Cc: Lyude Paul 
Acked-by: Daniel Vetter 
Cc: Rob Clark 
Cc: Sean Paul 
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Jani Nikula 

---

Note: I admit to not even build testing this one. I'd need a config,
possibly also a toolchain setup for that.
---
 drivers/gpu/drm/msm/dp/dp_ctrl.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index e3462f5d96d7..36b39c381b3f 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -1420,16 +1420,14 @@ void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl)
 static bool dp_ctrl_use_fixed_nvid(struct dp_ctrl_private *ctrl)
 {
u8 *dpcd = ctrl->panel->dpcd;
-   u32 edid_quirks = 0;
 
-   edid_quirks = drm_dp_get_edid_quirks(ctrl->panel->edid);
/*
 * For better interop experience, used a fixed NVID=0x8000
 * whenever connected to a VGA dongle downstream.
 */
if (drm_dp_is_branch(dpcd))
-   return (drm_dp_has_quirk(>panel->desc, edid_quirks,
-   DP_DPCD_QUIRK_CONSTANT_N));
+   return (drm_dp_has_quirk(>panel->desc,
+DP_DPCD_QUIRK_CONSTANT_N));
 
return false;
 }
-- 
2.20.1

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