<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>Writing from non-standard mail composer, forgive formatting mistakes.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 19, 2019 at 5:22 PM Vinay Simha B N <<a href="mailto:simhavcs@gmail.com">simhavcs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">added the temperature alert irq handler in adv driver , in the irq calling schedule_work(&adv7511->hpd_work); , initially in the </div><div dir="ltr">adv7511_detect , if we set status = connector_status_disconnected; later when irq handler calls the schedule work, hpd does not works.<br></div><div dir="ltr">[ 55.052677] [drm] Cannot find any crtc or sizes</div><div dir="ltr"><div dir="ltr">[ 55.058786] [drm] Cannot find any crtc or sizes</div><div dir="ltr"><br></div><div>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.</div><div><br></div></div></div></div></div></div></div></blockquote><div><br></div><div>Apparently driver has some problems with hotplug handling. As you wrote earlier:</div><div><div>> in userspace when i tried manually below commands, there is no impact in the display.</div><div><div>> /sys/class/drm/card0-HDMI-A-1/status</div><div>> echo off > status</div><div>> echo on > status</div></div></div><div><br></div><div>It suggests that code has some issues with hotplug detection/reporting.<br></div><div>The rule should be that if connector status changes drm_kms_helper_hotplug_event should be called, it looks like it is not.</div><div><br></div><div>Regards</div><div>Andrzej<br> </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 14, 2019 at 8:03 PM Andrzej Hajda <<a href="mailto:a.hajda@samsung.com" target="_blank">a.hajda@samsung.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 13.02.2019 15:31, Vinay Simha B N wrote:<br>
><br>
><br>
> On Wed, Feb 13, 2019 at 7:44 PM Andrzej Hajda <<a href="mailto:a.hajda@samsung.com" target="_blank">a.hajda@samsung.com</a><br>
> <mailto:<a href="mailto:a.hajda@samsung.com" target="_blank">a.hajda@samsung.com</a>>> wrote:<br>
><br>
> On 13.02.2019 14:40, Vinay Simha B N wrote:<br>
> > Andrzej/Daniel,<br>
> ><br>
> > please suggest any input on the scenario for temperature control and<br>
> > dsi bridge enable/disable.<br>
> ><br>
> > On Mon, Feb 11, 2019 at 2:41 PM Vinay Simha B N<br>
> <<a href="mailto:simhavcs@gmail.com" target="_blank">simhavcs@gmail.com</a> <mailto:<a href="mailto:simhavcs@gmail.com" target="_blank">simhavcs@gmail.com</a>><br>
> > <mailto:<a href="mailto:simhavcs@gmail.com" target="_blank">simhavcs@gmail.com</a> <mailto:<a href="mailto:simhavcs@gmail.com" target="_blank">simhavcs@gmail.com</a>>>> wrote:<br>
> ><br>
> > dsi2hdmi(adv7511) chip operating temperature range is -10 degC<br>
> > to +85 degC. We want to enable/disable the bridge only when<br>
> > temperature range is inbetween these range.<br>
> ><br>
> > We have temperature control chip to read the temp, tLow an tHigh<br>
> > can be set. whenever interrupt(alert) triggers we want to<br>
> > enablel/disable the bridge.<br>
> ><br>
> > Any suggestion what is the better way to handle this scenario?<br>
> ><br>
><br>
> Why do you need to bother about this quite big range at all?<br>
><br>
> we are looking for -10 deg C, this system will be used in a place<br>
> where temp goes beyond -20 deg C... processor(apq8016/410c) can handle<br>
> upto -30, but dsi2hdmi(adv7533) chip if enabled beyond -10 deg C, life<br>
> of the chip goes down or it cannot operate at all. <br>
><br>
><br>
> I guess the best would be to set whole platform operating temperature<br>
> range, and poweroff/sleep/slow down/??? whole system, not just one<br>
> random chip, which probably is not the most fragile piece, am I right?<br>
><br>
> right now we are focused only to disable the hdmi chip if temp goes<br>
> beyond -10, since this is only chip in board faces temp issue, other<br>
> components are fine to go upto -30 deg C.<br>
><br>
><br>
> If you really insist on handling it per chip, you can try to<br>
> investigate<br>
> following paths:<br>
><br>
> 1. Just disable the chip, without noticing drm, other drivers, or<br>
> userspace, and re-enable it if temperature become acceptable, but I am<br>
> not sure if this will not change behavior of other chips.<br>
><br>
> dsi2hdmi tied with drm framework, i need to enable/disable the bridge.<br>
> i can disable the regulators enabled for it , but this does not work<br>
> as we want.<br>
> <br>
><br>
> 2. Disable the chip and report to the drm subsystem<br>
> connector_status_disconnected - this will cause drm to stop display<br>
> pipeline and userspace notification.<br>
><br>
> any references/driver on how to disable and report to drm susbsystem<br>
> will help to implement.<br>
> connector_status_disconnected i need to call in the interrupt handler<br>
> of tmp102 driver.<br>
<br>
<br>
Look at the code of adv7511_hpd_work, it evaluates connector status<br>
based on ADV7511_REG_STATUS, so you can put there temperature check<br>
also, and call 'schedule_work(&adv7511->hpd_work)'<br>
<br>
if temperature passes valid temp range.<br>
<br>
If you want to do it in mainline, please consult it with adv7511<br>
authors/commiters.<br>
<br>
<br>
Regards<br>
<br>
Andrzej<br>
<br>
<br>
><br>
> in userspace when i tried manually below commands, there is no impact<br>
> in the display.<br>
> /sys/class/drm/card0-HDMI-A-1/status<br>
> echo off > status<br>
> echo on > status<br>
><br>
><br>
> Regards<br>
><br>
> Andrzej<br>
><br>
><br>
> ><br>
> > regards,<br>
> > vinaysimha<br>
> ><br>
> > On Mon, Feb 11, 2019 at 2:10 PM Daniel Vetter<br>
> <<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a> <mailto:<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>><br>
> > <mailto:<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a> <mailto:<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>>>> wrote:<br>
> ><br>
> > On Mon, Feb 11, 2019 at 09:32:54AM +0100, Andrzej Hajda<br>
> wrote:<br>
> > > On 11.02.2019 07:52, Vinay Simha B N wrote:<br>
> > > > hi,<br>
> > > ><br>
> > > > is it possible to control the drm bridge from another<br>
> > driver in irq<br>
> > > > handler(enable/disable the bridge)?<br>
> > ><br>
> > ><br>
> > > If you mean 'in irq context' the answer is no, usually<br>
> > enable/disable<br>
> > > callbacks can sleep, so cannot be called from atomic<br>
> context.<br>
> > ><br>
> > ><br>
> > > ><br>
> > > > is there a way to control the "dpms force off" and "dpms<br>
> > force on" in<br>
> > > > the interrupt handler?<br>
> > ><br>
> > ><br>
> > > Could you elaborate more on both subjects.<br>
> ><br>
> > Yeah, please explain what you want to use this for. dpms<br>
> on/off is<br>
> > controlled by userspace, the kernel should not change that<br>
> > state behind<br>
> > usersapce's back. If this is for some manuel refresh<br>
> display,<br>
> > then that's<br>
> > a bit a different story ofc, but for that you don't want<br>
> to do<br>
> > a real dpms<br>
> > force off/on.<br>
> > -Daniel<br>
> > ><br>
> > ><br>
> > > Regards<br>
> > ><br>
> > > Andrzej<br>
> > ><br>
> > ><br>
> > > ><br>
> > > > --<br>
> > > > regards,<br>
> > > > vinaysimha<br>
> > > ><br>
> > > > _______________________________________________<br>
> > > > dri-devel mailing list<br>
> > > > <a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
> <mailto:<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a>><br>
> > <mailto:<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
> <mailto:<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a>>><br>
> > > > <a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > dri-devel mailing list<br>
> > > <a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
> <mailto:<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a>><br>
> > <mailto:<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
> <mailto:<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a>>><br>
> > > <a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
> ><br>
> > --<br>
> > Daniel Vetter<br>
> > Software Engineer, Intel Corporation<br>
> > <a href="http://blog.ffwll.ch" rel="noreferrer" target="_blank">http://blog.ffwll.ch</a><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > regards,<br>
> > vinaysimha<br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > regards,<br>
> > vinaysimha<br>
><br>
><br>
><br>
><br>
> -- <br>
> regards,<br>
> vinaysimha<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_2074064628420042354gmail_signature">regards,<br>vinaysimha</div>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a></blockquote></div></div></div>