* [PATCH v2] drm/bridge: ps8640: Add software to support aux defer
@ 2022-09-30 4:25 Jason Yen
2022-09-30 14:20 ` Doug Anderson
0 siblings, 1 reply; 3+ messages in thread
From: Jason Yen @ 2022-09-30 4:25 UTC (permalink / raw)
To: LKML, Douglas Anderson, Andrzej Hajda, Neil Armstrong,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
David Airlie, Daniel Vetter, dri-devel
Cc: treapking, Jason Yen
This chip can not handle aux defer if the host directly program
its aux registers to access edid/dpcd. So we need let software
to handle the aux defer situation.
Signed-off-by: Jason Yen <jason.yen@paradetech.corp-partner.google.com>
---
Changes in v2:
- Add aux defer handler
- Remove incorrect statements
drivers/gpu/drm/bridge/parade-ps8640.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
index 31e88cb39f8a..76ada237096d 100644
--- a/drivers/gpu/drm/bridge/parade-ps8640.c
+++ b/drivers/gpu/drm/bridge/parade-ps8640.c
@@ -286,7 +286,6 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
}
switch (data & SWAUX_STATUS_MASK) {
- /* Ignore the DEFER cases as they are already handled in hardware */
case SWAUX_STATUS_NACK:
case SWAUX_STATUS_I2C_NACK:
/*
@@ -303,6 +302,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
case SWAUX_STATUS_ACKM:
len = data & SWAUX_M_MASK;
break;
+ case SWAUX_STATUS_DEFER:
+ case SWAUX_STATUS_I2C_DEFER:
+ if (is_native_aux)
+ msg->reply |= DP_AUX_NATIVE_REPLY_DEFER;
+ else
+ msg->reply |= DP_AUX_I2C_REPLY_DEFER;
+ len = data & SWAUX_M_MASK;
+ break;
case SWAUX_STATUS_INVALID:
return -EOPNOTSUPP;
case SWAUX_STATUS_TIMEOUT:
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] drm/bridge: ps8640: Add software to support aux defer
2022-09-30 4:25 [PATCH v2] drm/bridge: ps8640: Add software to support aux defer Jason Yen
@ 2022-09-30 14:20 ` Doug Anderson
2022-10-05 15:14 ` Doug Anderson
0 siblings, 1 reply; 3+ messages in thread
From: Doug Anderson @ 2022-09-30 14:20 UTC (permalink / raw)
To: Jason Yen
Cc: LKML, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec, David Airlie,
Daniel Vetter, dri-devel, Pin-yen Lin
Hi,
On Thu, Sep 29, 2022 at 9:25 PM Jason Yen
<jason.yen@paradetech.corp-partner.google.com> wrote:
>
> This chip can not handle aux defer if the host directly program
> its aux registers to access edid/dpcd. So we need let software
> to handle the aux defer situation.
>
> Signed-off-by: Jason Yen <jason.yen@paradetech.corp-partner.google.com>
> ---
>
> Changes in v2:
> - Add aux defer handler
> - Remove incorrect statements
>
> drivers/gpu/drm/bridge/parade-ps8640.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
> index 31e88cb39f8a..76ada237096d 100644
> --- a/drivers/gpu/drm/bridge/parade-ps8640.c
> +++ b/drivers/gpu/drm/bridge/parade-ps8640.c
> @@ -286,7 +286,6 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
> }
>
> switch (data & SWAUX_STATUS_MASK) {
> - /* Ignore the DEFER cases as they are already handled in hardware */
> case SWAUX_STATUS_NACK:
> case SWAUX_STATUS_I2C_NACK:
> /*
> @@ -303,6 +302,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
> case SWAUX_STATUS_ACKM:
> len = data & SWAUX_M_MASK;
> break;
> + case SWAUX_STATUS_DEFER:
> + case SWAUX_STATUS_I2C_DEFER:
> + if (is_native_aux)
> + msg->reply |= DP_AUX_NATIVE_REPLY_DEFER;
> + else
> + msg->reply |= DP_AUX_I2C_REPLY_DEFER;
> + len = data & SWAUX_M_MASK;
> + break;
This seems fine to me now. There is nothing too controversial here but
I'll still give this a few days on the list for anyone else to speak
up. I'll plan to land it midway through next week unless anything
comes up.
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] drm/bridge: ps8640: Add software to support aux defer
2022-09-30 14:20 ` Doug Anderson
@ 2022-10-05 15:14 ` Doug Anderson
0 siblings, 0 replies; 3+ messages in thread
From: Doug Anderson @ 2022-10-05 15:14 UTC (permalink / raw)
To: Jason Yen
Cc: LKML, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec, David Airlie,
Daniel Vetter, dri-devel, Pin-yen Lin
Hi,
On Fri, Sep 30, 2022 at 7:20 AM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Thu, Sep 29, 2022 at 9:25 PM Jason Yen
> <jason.yen@paradetech.corp-partner.google.com> wrote:
> >
> > This chip can not handle aux defer if the host directly program
> > its aux registers to access edid/dpcd. So we need let software
> > to handle the aux defer situation.
> >
> > Signed-off-by: Jason Yen <jason.yen@paradetech.corp-partner.google.com>
> > ---
> >
> > Changes in v2:
> > - Add aux defer handler
> > - Remove incorrect statements
> >
> > drivers/gpu/drm/bridge/parade-ps8640.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
> > index 31e88cb39f8a..76ada237096d 100644
> > --- a/drivers/gpu/drm/bridge/parade-ps8640.c
> > +++ b/drivers/gpu/drm/bridge/parade-ps8640.c
> > @@ -286,7 +286,6 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
> > }
> >
> > switch (data & SWAUX_STATUS_MASK) {
> > - /* Ignore the DEFER cases as they are already handled in hardware */
> > case SWAUX_STATUS_NACK:
> > case SWAUX_STATUS_I2C_NACK:
> > /*
> > @@ -303,6 +302,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
> > case SWAUX_STATUS_ACKM:
> > len = data & SWAUX_M_MASK;
> > break;
> > + case SWAUX_STATUS_DEFER:
> > + case SWAUX_STATUS_I2C_DEFER:
> > + if (is_native_aux)
> > + msg->reply |= DP_AUX_NATIVE_REPLY_DEFER;
> > + else
> > + msg->reply |= DP_AUX_I2C_REPLY_DEFER;
> > + len = data & SWAUX_M_MASK;
> > + break;
>
> This seems fine to me now. There is nothing too controversial here but
> I'll still give this a few days on the list for anyone else to speak
> up. I'll plan to land it midway through next week unless anything
> comes up.
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
As promised, pushed to drm-misc-next:
562d2dd87028 drm/bridge: ps8640: Add software to support aux defer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-05 15:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 4:25 [PATCH v2] drm/bridge: ps8640: Add software to support aux defer Jason Yen
2022-09-30 14:20 ` Doug Anderson
2022-10-05 15:14 ` Doug Anderson
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).