<div dir="ltr">Hi<div><br></div><div>Is there a way to set depth using a xorg.conf.d snippet rather than creating an xorg.conf?</div><div><br></div><div>Cheers</div><div><br></div><div>Mike<br><br><div class="gmail_quote"><div dir="ltr">On Wed, 6 Jun 2018 at 17:01 Michel Dänzer <<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Leo,<br>
<br>
<br>
On 2018-06-01 06:03 PM, <a href="mailto:sunpeng.li@amd.com" target="_blank">sunpeng.li@amd.com</a> wrote:<br>
> From: "Leo (Sunpeng) Li" <<a href="mailto:sunpeng.li@amd.com" target="_blank">sunpeng.li@amd.com</a>><br>
> <br>
> This ended up being different enough from v2 to warrant a new patchset. Per<br>
> Michel's suggestions, there have been various optimizations and cleanups.<br>
> Here's what's changed:<br>
> <br>
> * Cache DRM color management property IDs at pre-init,<br>
> * instead of querying DRM each time we need to modify color properties.<br>
> <br>
> * Remove drmmode_update_cm_props().<br>
> * Update color properties in drmmode_output_get_property() instead.<br>
> * This also makes old calls to update_cm_props redundant.<br>
> <br>
> * Get rid of fake CRTCs.<br>
> * Previously, we were allocating a fake CRTC to configure color props on<br>
> outputs that don't have a CRTC.<br>
> * Instead, rr_configure_and_change_cm_property() can be easily modified to<br>
> accept NULL CRTCs.<br>
> <br>
> * Drop patches to persist color properties across DPMS events.<br>
> * Kernel driver should be patched instead:<br>
> <a href="https://lists.freedesktop.org/archives/amd-gfx/2018-May/022744.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/amd-gfx/2018-May/022744.html</a><br>
> * Color props including legacy gamma now persist across crtc dpms.<br>
> * Non-legacy props now persist across output dpms and hotplug, as long<br>
> as the same CRTC remains attached to that output.<br>
> <br>
> And some smaller improvements:<br>
> <br>
> * Change CTM to be 32-bit format instead of 16-bit.<br>
> * This requires clients to ensure that each 32-bit element is padded to be<br>
> long-sized, since libXrandr parses 32-bit format as long-typed.<br>
> <br>
> * Optimized color management init during CRTC init.<br>
> * Query DRM once for the list of properties, instead of twice.<br>
<br>
Sounds good. I'll be going through the patches in detail from now on,<br>
but I don't know yet when I'll be able to finish the review.<br>
<br>
<br>
Meanwhile, heads up on two issues I discovered while smoke-testing the<br>
series (which are sort of related, but occur even without this series):<br>
<br>
<br>
Running Xorg in depth 30[0] results in completely wrong colours<br>
(everything has a red tint) with current kernels. I think this is<br>
because DC now preserves the gamma LUT values, but xf86-video-amdgpu<br>
never sets them at depth 30, so the hardware is still using values for<br>
24-bit RGB.<br>
<br>
Can you look into making xf86-video-amdgpu set the LUT values at depth<br>
30 as well? Ideally in a way which doesn't require all patches in this<br>
series, so that it could be backported for a 18.0.2 point release if<br>
necessary. (Similarly for skipping drmmode_cursor_gamma when the kernel<br>
supports the new colour management properties, to fix<br>
<a href="https://bugs.freedesktop.org/106578" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/106578</a>)<br>
<br>
<br>
Trying to run Xorg in depth 16 or 8[0] results in failure to set any mode:<br>
<br>
[ 56.138] (EE) AMDGPU(0): failed to set mode: Invalid argument<br>
[ 56.138] (WW) AMDGPU(0): Failed to set mode on CRTC 0<br>
[ 56.172] (EE) AMDGPU(0): Failed to enable any CRTC<br>
<br>
Works fine with amdgpu.dc=0. This has been broken at least since the<br>
4.16 development cycle.<br>
<br>
<br>
[0] You can change Xorg's colour depth either via -depth on its command<br>
line, or via the xorg.conf screen section:<br>
<br>
Section "Screen"<br>
Identifier "Screen0"<br>
DefaultDepth 30 # or 16 or 8<br>
EndSection<br>
<br>
<br>
-- <br>
Earthling Michel Dänzer | <a href="http://www.amd.com" rel="noreferrer" target="_blank">http://www.amd.com</a><br>
Libre software enthusiast | Mesa and X developer<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</blockquote></div></div></div>