Message ID | 20210120110708.32131-1-jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/msm/dp: fix build after dp quirk helper change | expand |
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; > }
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; >> }
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.
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.
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.
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
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.
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.
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; }