<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Microsoft Tai Le";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:Consolas">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">I have added code to get crtc_state in intel_check_primary_plane().<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">And using crtc_clock member crtc_state->base.adjusted_mode.crtc_clock.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">What I observed is, in below stack trace, valid allocation of crtc_state<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">is there, but seems crtc_state is zeroed out or atleast crtc_clock is 0.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Is it expected or something is broken somewhere?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">For things to work for scalers, I added a quick check before using crtc_clock<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">as a denominator for calculating scaling ratio.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Reason why it is working before refactoring my code (in response to Matt’s<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">feedback) is I think crtc_clock accessed elsewhere in setmode path
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">is never been 0.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">-Chandra<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584708] [<ffffffffc06ffa28>] intel_check_primary_plane+0x1f8/0x2b0 [i915]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584759] [<ffffffffc0711ce5>] intel_plane_atomic_check+0xa5/0x130 [i915]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584762] [<ffffffff810c0c39>] ? mutex_optimistic_spin+0x149/0x1d0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584770] [<ffffffffc065606f>] drm_atomic_helper_check_planes+0xdf/0x1f0 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584820] [<ffffffffc0711bb0>] intel_atomic_check+0x150/0x1a0 [i915]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584868] [<ffffffffc0711ddc>] ? intel_plane_duplicate_state+0x2c/0x80 [i915]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584886] [<ffffffffc0616345>] drm_atomic_check_only+0x235/0x4f0 [drm]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584890] [<ffffffff8119cba3>] ? kmemdup+0x43/0x60<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584908] [<ffffffffc0616690>] drm_atomic_commit+0x20/0x70 [drm]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584916] [<ffffffffc065471d>] drm_atomic_helper_plane_set_property+0x8d/0xc0 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584932] [<ffffffffc0604bed>] drm_mode_plane_set_obj_prop+0x2d/0x90 [drm]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584939] [<ffffffffc0656feb>] restore_fbdev_mode+0x6b/0xf0 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584946] [<ffffffffc0658b20>] drm_fb_helper_restore_fbdev_mode_unlocked+0x30/0x80 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584953] [<ffffffffc0658b94>] drm_fb_helper_set_par+0x24/0x50 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584959] [<ffffffffc0658a9c>] drm_fb_helper_hotplug_event+0xcc/0x120 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584964] [<ffffffffc0658b43>] drm_fb_helper_restore_fbdev_mode_unlocked+0x53/0x80 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.584969] [<ffffffffc0658b94>] drm_fb_helper_set_par+0x24/0x50 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585019] [<ffffffffc070dd7a>] intel_fbdev_set_par+0x1a/0x60 [i915]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585022] [<ffffffff81425614>] fbcon_init+0x514/0x5a0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585025] [<ffffffff814b607c>] visual_init+0xbc/0x120<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585029] [<ffffffff814b881a>] do_bind_con_driver+0x16a/0x320<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585032] [<ffffffff814b8af4>] do_take_over_console+0x124/0x1d0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585034] [<ffffffff81423abb>] do_fbcon_takeover+0x5b/0xb0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585037] [<ffffffff81428822>] fbcon_event_notify+0x672/0x800<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585041] [<ffffffff810993cd>] notifier_call_chain+0x4d/0x70<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585044] [<ffffffff81099628>] __blocking_notifier_call_chain+0x58/0x80<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585048] [<ffffffff81099666>] blocking_notifier_call_chain+0x16/0x20<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585051] [<ffffffff8142f35b>] fb_notifier_call_chain+0x1b/0x20<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585053] [<ffffffff8143147b>] register_framebuffer+0x1eb/0x320<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585061] [<ffffffffc0658e24>] drm_fb_helper_initial_config+0x264/0x430 [drm_kms_helper]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585110] [<ffffffffc070e89b>] intel_fbdev_initial_config+0x1b/0x20 [i915]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585113] [<ffffffff8109b03c>] async_run_entry_fn+0x4c/0x160<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585115] [<ffffffff81091cc4>] process_one_work+0x144/0x490<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585119] [<ffffffff8101556e>] ? __switch_to+0xbe/0x5b0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585121] [<ffffffff8109272d>] worker_thread+0x11d/0x530<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585124] [<ffffffff817c98ae>] ? __schedule+0x38e/0x9e8<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585126] [<ffffffff81092610>] ? create_worker+0x1f0/0x1f0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585129] [<ffffffff81098719>] kthread+0xc9/0xe0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585132] [<ffffffff81098650>] ? flush_kthread_worker+0x90/0x90<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585136] [<ffffffff817cdfd8>] ret_from_fork+0x58/0x90<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">[ 20.585139] [<ffffffff81098650>] ? flush_kthread_worker+0x90/0x90<o:p></o:p></span></p>
</div>
</body>
</html>