<div dir="ltr"><div>Hi,</div><div><br></div><div>Printing the backtrace from<span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"> si_flush_gfx_cs while /etc/environment contains GALLIUM_THREAD=0 at boot should show which GL call and X call caused the flush.</span></div><div><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></div><div><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">Marek<br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 16, 2021 at 10:58 PM Quan, Evan <<a href="mailto:Evan.Quan@amd.com">Evan.Quan@amd.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">[Public]<br>
<br>
<br>
<br>
> -----Original Message-----<br>
> From: Michel Dänzer <<a href="mailto:michel@daenzer.net" target="_blank">michel@daenzer.net</a>><br>
> Sent: Thursday, September 16, 2021 4:12 PM<br>
> To: Christian König <<a href="mailto:ckoenig.leichtzumerken@gmail.com" target="_blank">ckoenig.leichtzumerken@gmail.com</a>>; Quan, Evan<br>
> <<a href="mailto:Evan.Quan@amd.com" target="_blank">Evan.Quan@amd.com</a>><br>
> Cc: Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com" target="_blank">Alexander.Deucher@amd.com</a>>; Koenig, Christian<br>
> <<a href="mailto:Christian.Koenig@amd.com" target="_blank">Christian.Koenig@amd.com</a>>; '<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a>' <amd-<br>
> <a href="mailto:gfx@lists.freedesktop.org" target="_blank">gfx@lists.freedesktop.org</a>><br>
> Subject: Re: DRM IOCTLS come regularly(every minute) still even after screen<br>
> off<br>
> <br>
> On 2021-09-16 08:27, Christian König wrote:<br>
> > Good morning,<br>
> ><br>
> > for the background I advised to contact you Michel since we couldn't find<br>
> an explanation.<br>
> ><br>
> > Alex explanation might be correct, but the CS seems to come from the X<br>
> server and is always roughly 60 seconds after going into power save.<br>
> ><br>
> > Any idea what that could be?<br>
> <br>
> For the DRM_IOCTL_MODE_* ioctls, attaching gdb to Xorg and setting a<br>
> breakpoint on drmIoctl should show where they're coming from.<br>
> <br>
> The AMDGPU_CS ioctls are probably from glamor calling OpenGL, most likely<br>
> for X11 drawing protocol requests. Note that in this case drmIoctl/ioctl will<br>
> likely be called from a separate thread. Pierre / Marek should be able to help<br>
> you find out where the OpenGL calls are coming from.<br>
> <br>
> <br>
> In general, Xorg only ever does anything in response to:<br>
> <br>
> * X11 protocol requests, i.e. on behalf of clients.<br>
> * Input events, i.e. on behalf of the user.<br>
> * Other kernel events, e.g. hotplug events.<br>
> <br>
Thanks for sharing these.<br>
> <br>
> FWIW, with only xfwm4 & xterm running on Xorg, I'm not seeing any drmIoctl<br>
> calls during DPMS off. So the ioctls you're seeing are most likely triggered by<br>
> clients.<br>
> <br>
Got it. Thanks!<br>
<br>
Evan<br>
> <br>
> --<br>
> Earthling Michel Dänzer |<br>
> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fredh" rel="noreferrer" target="_blank">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fredh</a><br>
> <a href="http://at.com" rel="noreferrer" target="_blank">at.com</a>%2F&data=04%7C01%7CEvan.Quan%<a href="http://40amd.com" rel="noreferrer" target="_blank">40amd.com</a>%7C296d316427<br>
> b4469f8eb908d978e9b46a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7<br>
> C0%7C637673767426116632%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w<br>
> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&am<br>
> p;sdata=gBj4idZGCuaPdyaH1g1mfuDqPCcKhFMjPCbqpM8drlg%3D&res<br>
> erved=0<br>
> Libre software enthusiast | Mesa and X developer<br>
</blockquote></div>