mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Ripple <john.ripple@keysight.com>
To: dianders@chromium.org
Cc: Laurent.pinchart@ideasonboard.com, airlied@gmail.com,
	andrzej.hajda@intel.com, blake.vermeer@keysight.com,
	dri-devel@lists.freedesktop.org, jernej.skrabec@gmail.com,
	john.ripple@keysight.com, jonas@kwiboo.se,
	linux-kernel@vger.kernel.org, maarten.lankhorst@linux.intel.com,
	matt_laubhan@keysight.com, mripard@kernel.org,
	neil.armstrong@linaro.org, rfoss@kernel.org, simona@ffwll.ch,
	tzimmermann@suse.de
Subject: Re: [PATCH V3] drm/bridge: ti-sn65dsi86: Add support for DisplayPort mode with HPD
Date: Thu, 11 Sep 2025 12:39:28 -0600	[thread overview]
Message-ID: <20250911183928.2627172-1-john.ripple@keysight.com> (raw)
In-Reply-To: <CAD=FV=Um5NKHFZJJkC6eC0rnea0xSPeWVpK91PwGcrRjri28NA@mail.gmail.com>

Hi, 

>...and you don't need to check for "dev" being NULL because there's no
>way "hpd_enabled" could be true with "dev" being NULL. At least this
>is my assumption that the core DRM framework won't detach a bridge
>while HPD is enabled. If nothing else, I guess you could call
>ti_sn_bridge_hpd_disable() from ti_sn_bridge_detach()

I don't think ti_sn_bridge_hpd_disable() needs to be in 
ti_sn_brdige_detach(). The DRM framework should run the disable for hpd
before detaching the device. I haven't seen any issues with it so far.

>> @@ -1971,6 +2075,28 @@ static int ti_sn65dsi86_probe(struct i2c_client *client)
>>         if (strncmp(id_buf, "68ISD   ", ARRAY_SIZE(id_buf)))
>>                 return dev_err_probe(dev, -EOPNOTSUPP, "unsupported device >id\n");
>>
>> +       if (client->irq) {
>> +               ret = devm_request_threaded_irq(pdata->dev, client->irq, NULL,
>> +                                               ti_sn_bridge_interrupt,
>> +                                               IRQF_TRIGGER_RISING |
>> +                                               IRQF_TRIGGER_FALLING |
>> +                                               IRQF_ONESHOT,
>> +                                               "ti_sn65dsi86", pdata);
>> +
>> +               if (ret) {
>> +                       return dev_err_probe(dev, ret,
>> +                                            "failed to request interrupt\n");
>> +               }
>> +
>> +               /*
>> +                * Cleaning status register at probe is needed because if the >irq is
>> +                * already high, the rising/falling condition will never occur
>> +                */
>> +               ret = regmap_write(pdata->regmap, SN_IRQ_STATUS_REG, 0xFF);
>> +               if (ret)
>> +                       pr_warn("Failed to clear IRQ initial state: %d\n", >ret);
>
>Actually, wait. Why do you want "rising" and "falling". Isn't this a
>level-triggered interrupt? Then you also don't need this bogus clear
>of interrupts here...

I changed it out for a high level interrupt and it looks fine. The IRQ
line off the check also seems to only send one pulse for about 1.09 ms
when the IRQ is toggled, so I think its doing a level interrupt since 
1 KHz is way slower than the refclk. For 0xE0 the documentation also 
says "the IRQ output is driven high to communicate IRQ events" so I
think you're correct.

>...and also, I seem to recall it's usually better to not specify a
>type here and rely on the type in the device tree. I seem to remember
>there being some weird corner cases (maybe around remove / reprobe or
>maybe about deferred probes?) if an interrupt type is specified in
>both code and device tree and those types don't match...

I couldn't find anything about this and all the other drivers in 
drivers/gpu-drm/bridge that use the devm_request_threaded_irq just 
directly set the irq type. I couldn't find any that read in the device 
tree for it. The display-connector.c general driver also seems to just 
set the type directly. Do you have an example where this is used?

The tisn65dsi86 chip also shouldn't be changing how it does its 
interrupts, so having the hardcoded high interrupt in the driver seems
like it would be fine.

  reply	other threads:[~2025-09-11 18:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 15:24 [PATCH 1/2] " John Ripple
2025-08-20 15:24 ` [PATCH 2/2] drm/bridge: ti-sn65dsi86: break probe dependency loop John Ripple
2025-08-29 16:40   ` Doug Anderson
2025-09-01  7:00     ` Maxime Ripard
2025-09-02 16:22     ` John Ripple
2025-09-02 17:26       ` Doug Anderson
2025-08-29 16:40 ` [PATCH 1/2] drm/bridge: ti-sn65dsi86: Add support for DisplayPort mode with HPD Doug Anderson
2025-09-08 20:36   ` [PATCH V2] " John Ripple
2025-09-09  0:11     ` Doug Anderson
2025-09-09 19:36       ` John Ripple
2025-09-09 22:44         ` Doug Anderson
2025-09-10 18:33     ` [PATCH V3] " John Ripple
2025-09-10 20:48       ` Doug Anderson
2025-09-11 18:39         ` John Ripple [this message]
2025-09-11 23:25           ` Doug Anderson
2025-09-12 19:23             ` John Ripple
2025-09-12 19:24       ` [PATCH V4] " John Ripple
2025-09-12 20:02         ` Doug Anderson
2025-09-12 21:08         ` [PATCH V5] " John Ripple
2025-09-12 21:27           ` Doug Anderson
2025-09-15 16:50           ` [PATCH V6] " John Ripple
2025-09-15 17:33             ` Doug Anderson
2025-09-15 17:47               ` [PATCH V3] " John Ripple
2025-09-15 17:45             ` [PATCH V7] " John Ripple
2025-09-15 17:57               ` Doug Anderson
2025-09-23 15:23                 ` Doug Anderson
2025-09-16  5:46       ` [PATCH V3] " Dan Carpenter
2025-09-16 14:30         ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250911183928.2627172-1-john.ripple@keysight.com \
    --to=john.ripple@keysight.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=blake.vermeer@keysight.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matt_laubhan@keysight.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®