dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dp: fix build after dp quirk helper change
@ 2021-01-20 11:07 Jani Nikula
  2021-01-20 17:26 ` Lyude Paul
  0 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2021-01-20 11:07 UTC (permalink / raw)
  To: intel-gfx
  Cc: Stephen Rothwell, jani.nikula, Daniel Vetter, dri-devel, Sean Paul

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 <sfr@canb.auug.org.au>
References: http://lore.kernel.org/r/20210120105715.4391dd95@canb.auug.org.au
Fixes: 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based quirks"")
Cc: Lyude Paul <lyude@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

---

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(&ctrl->panel->desc, edid_quirks,
-				DP_DPCD_QUIRK_CONSTANT_N));
+		return (drm_dp_has_quirk(&ctrl->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

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

* Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change
  2021-01-20 11:07 [PATCH] drm/msm/dp: fix build after dp quirk helper change Jani Nikula
@ 2021-01-20 17:26 ` Lyude Paul
  2021-01-21 11:22   ` Jani Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Lyude Paul @ 2021-01-20 17:26 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx
  Cc: Stephen Rothwell, Sean Paul, dri-devel, Daniel Vetter

Reviewed-by: Lyude Paul <lyude@redhat.com>

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 <sfr@canb.auug.org.au>
> References:
> http://lore.kernel.org/r/20210120105715.4391dd95@canb.auug.org.au
> Fixes: 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based quirks"")
> Cc: Lyude Paul <lyude@redhat.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> 
> ---
> 
> 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(&ctrl->panel->desc, edid_quirks,
> -                               DP_DPCD_QUIRK_CONSTANT_N));
> +               return (drm_dp_has_quirk(&ctrl->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

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

* Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change
  2021-01-20 17:26 ` Lyude Paul
@ 2021-01-21 11:22   ` Jani Nikula
  2021-01-21 11:30     ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2021-01-21 11:22 UTC (permalink / raw)
  To: Lyude Paul, intel-gfx
  Cc: Stephen Rothwell, Sean Paul, dri-devel, Daniel Vetter

On Wed, 20 Jan 2021, Lyude Paul <lyude@redhat.com> wrote:
> Reviewed-by: Lyude Paul <lyude@redhat.com>

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 <sfr@canb.auug.org.au>
>> References:
>> http://lore.kernel.org/r/20210120105715.4391dd95@canb.auug.org.au
>> Fixes: 7c553f8b5a7d ("drm/dp: Revert "drm/dp: Introduce EDID-based quirks"")
>> Cc: Lyude Paul <lyude@redhat.com>
>> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Rob Clark <robdclark@gmail.com>
>> Cc: Sean Paul <sean@poorly.run>
>> Cc: dri-devel@lists.freedesktop.org
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> 
>> ---
>> 
>> 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(&ctrl->panel->desc, edid_quirks,
>> -                               DP_DPCD_QUIRK_CONSTANT_N));
>> +               return (drm_dp_has_quirk(&ctrl->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

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

* Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change
  2021-01-21 11:22   ` Jani Nikula
@ 2021-01-21 11:30     ` Fabio Estevam
  2021-01-21 11:41       ` Jani Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-01-21 11:30 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Stephen Rothwell, Daniel Vetter, Intel Graphics Development,
	DRI mailing list, Sean Paul

Hi Jani,

On Thu, Jan 21, 2021 at 8:22 AM Jani Nikula <jani.nikula@intel.com> 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(&ctrl->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(&ctrl->panel->desc, edid_quirks,
-                               DP_DPCD_QUIRK_CONSTANT_N));
+               return (drm_dp_has_quirk(&ctrl->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

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

* Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change
  2021-01-21 11:30     ` Fabio Estevam
@ 2021-01-21 11:41       ` Jani Nikula
  2021-01-21 11:49         ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2021-01-21 11:41 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Stephen Rothwell, Daniel Vetter, Intel Graphics Development,
	DRI mailing list, Sean Paul

On Thu, 21 Jan 2021, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Jani,
>
> On Thu, Jan 21, 2021 at 8:22 AM Jani Nikula <jani.nikula@intel.com> 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(&ctrl->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(&ctrl->panel->desc, edid_quirks,
> -                               DP_DPCD_QUIRK_CONSTANT_N));
> +               return (drm_dp_has_quirk(&ctrl->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

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

* Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change
  2021-01-21 11:41       ` Jani Nikula
@ 2021-01-21 11:49         ` Fabio Estevam
  2021-01-21 12:10           ` Jani Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-01-21 11:49 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Stephen Rothwell, Daniel Vetter, Intel Graphics Development,
	DRI mailing list, Sean Paul

On Thu, Jan 21, 2021 at 8:41 AM Jani Nikula <jani.nikula@intel.com> 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

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

* Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change
  2021-01-21 11:49         ` Fabio Estevam
@ 2021-01-21 12:10           ` Jani Nikula
  2021-01-21 12:53             ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2021-01-21 12:10 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Stephen Rothwell, Intel Graphics Development, Sean Paul,
	DRI mailing list, Daniel Vetter

On Thu, 21 Jan 2021, Fabio Estevam <festevam@gmail.com> wrote:
> On Thu, Jan 21, 2021 at 8:41 AM Jani Nikula <jani.nikula@intel.com> 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

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

* Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change
  2021-01-21 12:10           ` Jani Nikula
@ 2021-01-21 12:53             ` Fabio Estevam
  2021-01-21 13:14               ` Jani Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-01-21 12:53 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Stephen Rothwell, Intel Graphics Development, Sean Paul,
	DRI mailing list, Daniel Vetter

On Thu, Jan 21, 2021 at 9:10 AM Jani Nikula <jani.nikula@intel.com> 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

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

* Re: [PATCH] drm/msm/dp: fix build after dp quirk helper change
  2021-01-21 12:53             ` Fabio Estevam
@ 2021-01-21 13:14               ` Jani Nikula
  0 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2021-01-21 13:14 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Stephen Rothwell, Intel Graphics Development, Sean Paul,
	DRI mailing list, Daniel Vetter

On Thu, 21 Jan 2021, Fabio Estevam <festevam@gmail.com> wrote:
> On Thu, Jan 21, 2021 at 9:10 AM Jani Nikula <jani.nikula@intel.com> 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

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

end of thread, other threads:[~2021-01-21 13:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 11:07 [PATCH] drm/msm/dp: fix build after dp quirk helper change Jani Nikula
2021-01-20 17:26 ` Lyude Paul
2021-01-21 11:22   ` Jani Nikula
2021-01-21 11:30     ` Fabio Estevam
2021-01-21 11:41       ` Jani Nikula
2021-01-21 11:49         ` Fabio Estevam
2021-01-21 12:10           ` Jani Nikula
2021-01-21 12:53             ` Fabio Estevam
2021-01-21 13:14               ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).