drm bridge control from another driver

Vinay Simha B N simhavcs at gmail.com
Mon Feb 18 15:19:19 UTC 2019


added the temperature alert irq handler in adv driver , in the irq
calling schedule_work(&adv7511->hpd_work); , initially in the
adv7511_detect , if we set status = connector_status_disconnected; later
when irq handler calls the schedule work, hpd does not works.
[   55.052677] [drm] Cannot find any crtc or sizes
[   55.058786] [drm] Cannot find any crtc or sizes

by default driver of adv, hpd does not works as expected, board boots
without hdmi connected, after postboot if we connect hdmi , in irq hpd_work
,but to get the display we need to press ctrl+alt+backspace.


On Thu, Feb 14, 2019 at 8:03 PM Andrzej Hajda <a.hajda at samsung.com> wrote:

> On 13.02.2019 15:31, Vinay Simha B N wrote:
> >
> >
> > On Wed, Feb 13, 2019 at 7:44 PM Andrzej Hajda <a.hajda at samsung.com
> > <mailto:a.hajda at samsung.com>> wrote:
> >
> >     On 13.02.2019 14:40, Vinay Simha B N wrote:
> >     > Andrzej/Daniel,
> >     >
> >     > please suggest any input on the scenario for temperature control
> and
> >     > dsi bridge enable/disable.
> >     >
> >     > On Mon, Feb 11, 2019 at 2:41 PM Vinay Simha B N
> >     <simhavcs at gmail.com <mailto:simhavcs at gmail.com>
> >     > <mailto:simhavcs at gmail.com <mailto:simhavcs at gmail.com>>> wrote:
> >     >
> >     >     dsi2hdmi(adv7511) chip operating temperature range is -10 degC
> >     >     to +85 degC. We want to enable/disable the bridge only when
> >     >     temperature range is inbetween these range.
> >     >
> >     >     We have temperature control chip to read the temp, tLow an
> tHigh
> >     >     can be set. whenever interrupt(alert) triggers we want to
> >     >     enablel/disable the bridge.
> >     >
> >     >     Any suggestion what is the better way to handle this scenario?
> >     >
> >
> >     Why do you need to bother about this quite big range at all?
> >
> > we are looking for -10 deg C, this system will be used in a place
> > where temp goes beyond -20 deg C... processor(apq8016/410c) can handle
> > upto -30, but dsi2hdmi(adv7533) chip if enabled beyond -10 deg C, life
> > of the chip goes down or it cannot operate at all.
> >
> >
> >     I guess the best would be to set whole platform operating temperature
> >     range, and poweroff/sleep/slow down/??? whole system, not just one
> >     random chip, which probably is not the most fragile piece, am I
> right?
> >
> > right now we are focused only to disable the hdmi chip if temp goes
> > beyond -10, since this is only chip in board faces temp issue, other
> > components are fine to go upto -30 deg C.
> >
> >
> >     If you really insist on handling it per chip, you can try to
> >     investigate
> >     following paths:
> >
> >     1. Just disable the chip, without noticing drm, other drivers, or
> >     userspace, and re-enable it if temperature become acceptable, but I
> am
> >     not sure if this will not change behavior of other chips.
> >
> > dsi2hdmi tied with drm framework, i need to enable/disable the bridge.
> > i can disable the regulators enabled for it , but this does not work
> > as we want.
> >
> >
> >     2. Disable the chip and report to the drm subsystem
> >     connector_status_disconnected - this will cause drm to stop display
> >     pipeline and userspace notification.
> >
> > any references/driver on how to disable and report to drm susbsystem
> > will help to implement.
> > connector_status_disconnected i need to call in the interrupt handler
> > of tmp102 driver.
>
>
> Look at the code of adv7511_hpd_work, it evaluates connector status
> based on ADV7511_REG_STATUS, so you can put there temperature check
> also, and call 'schedule_work(&adv7511->hpd_work)'
>
> if temperature passes valid temp range.
>
> If you want to do it in mainline, please consult it with adv7511
> authors/commiters.
>
>
> Regards
>
> Andrzej
>
>
> >
> > in userspace when i tried manually  below commands, there is no impact
> > in the display.
> > /sys/class/drm/card0-HDMI-A-1/status
> > echo off > status
> > echo on > status
> >
> >
> >     Regards
> >
> >     Andrzej
> >
> >
> >     >
> >     >     regards,
> >     >     vinaysimha
> >     >
> >     >     On Mon, Feb 11, 2019 at 2:10 PM Daniel Vetter
> >     <daniel at ffwll.ch <mailto:daniel at ffwll.ch>
> >     >     <mailto:daniel at ffwll.ch <mailto:daniel at ffwll.ch>>> wrote:
> >     >
> >     >         On Mon, Feb 11, 2019 at 09:32:54AM +0100, Andrzej Hajda
> >     wrote:
> >     >         > On 11.02.2019 07:52, Vinay Simha B N wrote:
> >     >         > > hi,
> >     >         > >
> >     >         > > is it possible to control the drm bridge from another
> >     >         driver in irq
> >     >         > > handler(enable/disable the bridge)?
> >     >         >
> >     >         >
> >     >         > If you mean 'in irq context' the answer is no, usually
> >     >         enable/disable
> >     >         > callbacks can sleep, so cannot be called from atomic
> >     context.
> >     >         >
> >     >         >
> >     >         > >
> >     >         > > is there a way to control the "dpms force off" and
> "dpms
> >     >         force on" in
> >     >         > > the interrupt handler?
> >     >         >
> >     >         >
> >     >         > Could you elaborate more on both subjects.
> >     >
> >     >         Yeah, please explain what you want to use this for. dpms
> >     on/off is
> >     >         controlled by userspace, the kernel should not change that
> >     >         state behind
> >     >         usersapce's back. If this is for some manuel refresh
> >     display,
> >     >         then that's
> >     >         a bit a different story ofc, but for that you don't want
> >     to do
> >     >         a real dpms
> >     >         force off/on.
> >     >         -Daniel
> >     >         >
> >     >         >
> >     >         > Regards
> >     >         >
> >     >         > Andrzej
> >     >         >
> >     >         >
> >     >         > >
> >     >         > > --
> >     >         > > regards,
> >     >         > > vinaysimha
> >     >         > >
> >     >         > > _______________________________________________
> >     >         > > dri-devel mailing list
> >     >         > > dri-devel at lists.freedesktop.org
> >     <mailto:dri-devel at lists.freedesktop.org>
> >     >         <mailto:dri-devel at lists.freedesktop.org
> >     <mailto:dri-devel at lists.freedesktop.org>>
> >     >         > >
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >     >         >
> >     >         >
> >     >         > _______________________________________________
> >     >         > dri-devel mailing list
> >     >         > dri-devel at lists.freedesktop.org
> >     <mailto:dri-devel at lists.freedesktop.org>
> >     >         <mailto:dri-devel at lists.freedesktop.org
> >     <mailto:dri-devel at lists.freedesktop.org>>
> >     >         > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >     >
> >     >         --
> >     >         Daniel Vetter
> >     >         Software Engineer, Intel Corporation
> >     >         http://blog.ffwll.ch
> >     >
> >     >
> >     >
> >     >     --
> >     >     regards,
> >     >     vinaysimha
> >     >
> >     >
> >     >
> >     > --
> >     > regards,
> >     > vinaysimha
> >
> >
> >
> >
> > --
> > regards,
> > vinaysimha
>
>
>

-- 
regards,
vinaysimha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190218/0bee59d4/attachment-0001.html>


More information about the dri-devel mailing list