<div dir="ltr">Hi Thierry,<div><br><br>On Tue, Apr 22, 2014 at 1:49 PM, Thierry Reding <<a href="mailto:thierry.reding@gmail.com">thierry.reding@gmail.com</a>> wrote:<br>> On Tue, Apr 22, 2014 at 04:09:11AM +0530, Ajay Kumar wrote:<br>
>> Most of the panels need an init sequence as mentioned below:<br>>> -- poweron LCD unit/LCD_EN<br>>> -- start video data<br>>> -- poweron LED unit/BL_EN<br>>> And, a de-init sequence as mentioned below:<br>
>> -- poweroff LED unit/BL_EN<br>>> -- stop video data<br>>> -- poweroff LCD unit/LCD_EN<br>>> With existing callbacks for drm panel, we cannot accomodate such panels,<br>>> since only two callbacks, i.e "panel_enable" and panel_disable are supported.<br>
>><br>>> This patch adds:<br>>> -- "pre_enable" callback which can be called before<br>>> the actual video data is on, and then call the "enable"<br>>> callback after the video data is available.<br>
>><br>>> -- "post_disable" callback which can be called after<br>>> the video data is off, and use "disable" callback<br>>> to do something before switching off the video data.<br>
>><br>>> Now, we can easily map the above scenario as shown below:<br>>> poweron LCD unit/LCD_EN = "pre_enable" callback<br>>> poweron LED unit/BL_EN = "enable" callback<br>
>> poweroff LED unit/BL_EN = "disable" callback<br>>> poweroff LCD unit/LCD_EN = "post_disable" callback<br>><br>> I don't like this. What happens when the next panel comes around that<br>
> has a yet slightly different requirement? Will we introduce a new<br>> pre_pre_enable() and post_post_disable() function then?<br>></div><div>As I have already explained, these 2 callbacks are sufficient enough to take care</div>
<div>the power up/down sequence for LVDS and eDP panels. And, definitely having</div><div>just 2 callbacks "enable" and "disable" is not at all sufficient.</div><div><br></div><div>I initially thought of using panel_simple_enable from panel-simple driver.</div>
<div>But it doesn't go well with case wherein there are 2 regulators(one for LCD and one for LED)</div><div>a BL_EN signal etc. And, often(Believe me, I have referred to both eDP panel datasheets</div><div>and LVDS panel datasheets) proper powerup sequence for such panels is as mentioned below:</div>
<div><br></div><div>powerup:</div><div>-- power up the supply (LCD_VCC).</div><div>-- start video data.</div><div>-- enable backlight.</div><div><br></div><div>powerdown</div><div>-- disable backlight.</div><div>-- stop video data.</div>
<div>-- power off the supply (LCD VCC)</div><div><br></div><div>For the above cases, if I have to somehow fit in all the required settings,</div><div>it breaks the sequence and I end up getting glitches during bootup/DPMS.</div>
<div><br></div><div>Also, when the drm_bridge can support pre_enable and post_disable, why not</div><div>drm_panel provide that both should work in tandem?</div><div><br></div><div>> There's got to be a better way to solve this.<br>
><br>> Thierry<br><br></div><div><br></div><div>Thanks and Regards,</div><div>Ajay Kumar</div></div>