Re: [PATCH] drm/amd/display: Only require EDID read for HDMI and DVI

2018-08-02 Thread Nicholas Kazlauskas
or_signal)) return false; default: break; Looks good. Fixing the indenting or merging the conditions would be a good idea, however. Reviewed-by: Nicholas Kazlauskas ___ amd-gf

[PATCH] drm/amd/pp: Reset memory levels table before populating values

2018-08-01 Thread Nicholas Kazlauskas
significant refactoring would likely be needed. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr

Re: [PATCH v2] drm/amd/display: Report non-DP display as disconnected without EDID

2018-08-01 Thread Nicholas Kazlauskas
ve no EDID in order to go to +* fail-safe mode +*/ + if (!dc_is_dp_signal(link->connector_signal)) + return false; default: break; } Reviewed

[PATCH] drm/amd/display: Fix overflow/truncation from strncpy.

2018-07-20 Thread Nicholas Kazlauskas
issues by using the real size for the buffer and making use of strscpy (which always terminates). Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amd

Re: [PATCH v2] drm/amd/display: Convert 10kHz clks from PPLib into kHz for Vega

2018-07-12 Thread Nicholas Kazlauskas
This does get called from both dce120 and dce112, but it will also any fix any problems for dce112 as well. Looks fine to me. Reviewed-by: Nicholas Kazlauskas Nicholas Kazlauskas On 07/12/2018 10:09 AM, Harry Wentland wrote: The driver is expecting clock frequency in kHz, while SMU returns

[PATCH v3 0/4] A DRM API for adaptive sync and variable refresh rate support

2018-10-05 Thread Nicholas Kazlauskas
devel/2017-October/155207.html https://lists.freedesktop.org/archives/dri-devel/2018-September/189404.html https://lists.freedesktop.org/archives/dri-devel/2018-September/190910.html Nicholas Kazlauskas (4): drm: Add vrr_capable property to the drm connector drm: Add vrr_enabled

[PATCH v3 1/4] drm: Add vrr_capable property to the drm connector

2018-10-05 Thread Nicholas Kazlauskas
g variable refresh rates using drm_connector_attach_vrr_capable_property(). The value should be updated based on driver and hardware capabiltiy by using drm_connector_set_vrr_capable_property(). Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_connec

[PATCH v3 2/4] drm: Add vrr_enabled property to drm CRTC

2018-10-05 Thread Nicholas Kazlauskas
to implement support. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_atomic_uapi.c | 4 drivers/gpu/drm/drm_crtc.c| 2 ++ drivers/gpu/drm/drm_mode_config.c | 6 ++ include/drm/drm_crtc.h| 9 + include/drm/drm_mode_config.h | 5 + 5 files changed, 26

[PATCH v3 3/4] drm: Document variable refresh properties

2018-10-05 Thread Nicholas Kazlauskas
These include the drm_connector 'vrr_capable' and the drm_crtc 'vrr_enabled' properties. Signed-off-by: Nicholas Kazlauskas --- Documentation/gpu/drm-kms.rst | 7 +++ drivers/gpu/drm/drm_connector.c | 22 ++ 2 files changed, 29 insertions(+) diff --git

[PATCH v3 4/4] drm/amd/display: Set FreeSync state using drm VRR properties

2018-10-05 Thread Nicholas Kazlauskas
refresh state and capability before the CRTC disable pass. (3) Performing VRR stream updates on-flip is needed for enabling BTR support. VRR packets and timing adjustments are now tracked and compared to previous values sent to the hardware. Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm

[PATCH v4 0/4] A DRM API for adaptive sync and variable refresh rate support

2018-10-11 Thread Nicholas Kazlauskas
linked below for reference: https://lists.freedesktop.org/archives/amd-gfx/2018-April/021047.html https://lists.freedesktop.org/archives/dri-devel/2017-October/155207.html https://lists.freedesktop.org/archives/dri-devel/2018-September/189404.htm https://lists.freedesktop.org/archives/dri-deve

[PATCH v4 3/4] drm: Document variable refresh properties

2018-10-11 Thread Nicholas Kazlauskas
These include the drm_connector 'vrr_capable' and the drm_crtc 'vrr_enabled' properties. Signed-off-by: Nicholas Kazlauskas --- Documentation/gpu/drm-kms.rst | 7 +++ drivers/gpu/drm/drm_connector.c | 22 ++ 2 files changed, 29 insertions(+) diff --git

[PATCH v4 2/4] drm: Add vrr_enabled property to drm CRTC

2018-10-11 Thread Nicholas Kazlauskas
to implement support. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_atomic_uapi.c | 4 drivers/gpu/drm/drm_crtc.c| 2 ++ drivers/gpu/drm/drm_mode_config.c | 6 ++ include/drm/drm_crtc.h| 9 + include/drm/drm_mode_config.h | 5 + 5 files changed, 26

[PATCH v4 1/4] drm: Add vrr_capable property to the drm connector

2018-10-11 Thread Nicholas Kazlauskas
g variable refresh rates using drm_connector_attach_vrr_capable_property(). The value should be updated based on driver and hardware capabiltiy by using drm_connector_set_vrr_capable_property(). Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_connec

[PATCH v4 4/4] drm/amd/display: Set FreeSync state using drm VRR properties

2018-10-11 Thread Nicholas Kazlauskas
state and capability before the CRTC disable pass. (3) Performing VRR stream updates on-flip is needed for enabling BTR support. VRR packets and timing adjustments are now tracked and compared to previous values sent to the hardware. Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd

[PATCH v5 0/4] A DRM API for adaptive sync and variable refresh rate support

2018-10-12 Thread Nicholas Kazlauskas
evel/2018-September/189404.htm https://lists.freedesktop.org/archives/dri-devel/2018-September/190910.html https://lists.freedesktop.org/archives/dri-devel/2018-October/192211.html https://lists.freedesktop.org/archives/dri-devel/2018-October/192874.html Nicholas Kazlauskas (4): drm: Add vrr_capa

[PATCH v5 1/4] drm: Add vrr_capable property to the drm connector

2018-10-12 Thread Nicholas Kazlauskas
g variable refresh rates using drm_connector_attach_vrr_capable_property(). The value should be updated based on driver and hardware capabiltiy by using drm_connector_set_vrr_capable_property(). Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_connec

[PATCH v5 4/4] drm/amdgpu: Set FreeSync state using drm VRR properties

2018-10-12 Thread Nicholas Kazlauskas
to previous values sent to the hardware. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 7 - .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 255 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +- 3 files changed, 138 insertions(+), 131

[PATCH v5 2/4] drm: Add vrr_enabled property to drm CRTC

2018-10-12 Thread Nicholas Kazlauskas
to implement support. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_atomic_uapi.c | 4 drivers/gpu/drm/drm_crtc.c| 2 ++ drivers/gpu/drm/drm_mode_config.c | 6 ++ include/drm/drm_crtc.h| 9 + include/drm/drm_mode_config.h | 5 + 5 files changed, 26

[PATCH v5 3/4] drm: Document variable refresh properties

2018-10-12 Thread Nicholas Kazlauskas
These include the drm_connector 'vrr_capable' and the drm_crtc 'vrr_enabled' properties. Signed-off-by: Nicholas Kazlauskas --- Documentation/gpu/drm-kms.rst | 7 +++ drivers/gpu/drm/drm_connector.c | 22 ++ 2 files changed, 29 insertions(+) diff --git

[PATCH] drm/amdgpu: Add DCC flags for GFX9 amdgpu_bo

2018-10-23 Thread Nicholas Kazlauskas
attributes to both libdrm and amdgpu_dm. Signed-off-by: Nicholas Kazlauskas --- include/uapi/drm/amdgpu_drm.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index 6a0d77dcfc47..faaad04814e4 100644 --- a/include/uapi/drm

[PATCH v2 2/2] drm/amd/display: Support amdgpu "max bpc" connector property

2018-11-07 Thread Nicholas Kazlauskas
bug.cgi?id=201585 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200645 Fixes: e03fd3f300f6 ("drm/amd/display: Do not limit color depth to 8bpc") Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 16 .../gpu/drm/amd/display/a

[PATCH v2 1/2] drm/amdgpu: Add amdgpu "max bpc" connector property

2018-11-07 Thread Nicholas Kazlauskas
the panel since it follows Intel's existing driver conventions. This proprety should be removed once common drm support for max bpc lands. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 2 ++ 2 files

[PATCH v7 0/5] A DRM API for adaptive sync and variable refresh rate support

2018-11-08 Thread Nicholas Kazlauskas
2017-October/155207.html https://lists.freedesktop.org/archives/dri-devel/2018-September/189404.htm https://lists.freedesktop.org/archives/dri-devel/2018-September/190910.html https://lists.freedesktop.org/archives/dri-devel/2018-October/192211.html https://lists.freedesktop.org/archives/dri-devel/

[PATCH v7 4/5] drm/amdgpu: Correct get_crtc_scanoutpos behavior when vpos >= vtotal

2018-11-08 Thread Nicholas Kazlauskas
lip timestamp from being the previous timestamp to the calculation to the next timestamp when position >= vtotal. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Cc: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 ++- 1 file changed, 6 insertions(+), 1 de

[PATCH v7 1/5] drm: Add vrr_capable property to the drm connector

2018-11-08 Thread Nicholas Kazlauskas
g variable refresh rates using drm_connector_attach_vrr_capable_property(). The value should be updated based on driver and hardware capability by using drm_connector_set_vrr_capable_property(). Signed-off-by: Nicholas Kazlauskas Reviewed-by: Manasi Navare Reviewed-by: Harry Wentland --- drive

[PATCH v7 5/5] drm/amdgpu: Set FreeSync state using drm VRR properties

2018-11-08 Thread Nicholas Kazlauskas
to previous values sent to the hardware. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 7 - .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 255 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +- 3 files

[PATCH v7 3/5] drm: Document variable refresh properties

2018-11-08 Thread Nicholas Kazlauskas
These include the drm_connector 'vrr_capable' and the drm_crtc 'vrr_enabled' properties. Signed-off-by: Nicholas Kazlauskas Cc: Harry Wentland Cc: Manasi Navare Cc: Pekka Paalanen Cc: Ville Syrjälä Cc: Michel Dänzer --- Documentation/gpu/drm-kms.rst | 7 drivers/gpu/drm

[PATCH v6 0/5] A DRM API for adaptive sync and variable refresh rate support

2018-11-06 Thread Nicholas Kazlauskas
ri-devel/2018-September/190910.html https://lists.freedesktop.org/archives/dri-devel/2018-October/192211.html https://lists.freedesktop.org/archives/dri-devel/2018-October/192874.html Nicholas Kazlauskas (5): drm: Add vrr_capable property to the drm connector drm: Add vrr_enabled property to drm CRT

[PATCH v6 4/5] drm/amdgpu: Correct get_crtc_scanoutpos behavior when vpos >= vtotal

2018-11-06 Thread Nicholas Kazlauskas
lip timestap from being the previous timestamp to the calculation to the next timestamp when position >= vtotal. Signed-off-by: Nicholas Kazlauskas Cc: Michel Dänzer Cc: Harry Wentland --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)

[PATCH v6 5/5] drm/amdgpu: Set FreeSync state using drm VRR properties

2018-11-06 Thread Nicholas Kazlauskas
to previous values sent to the hardware. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 7 - .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 255 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +- 3 files

[PATCH v6 3/5] drm: Document variable refresh properties

2018-11-06 Thread Nicholas Kazlauskas
These include the drm_connector 'vrr_capable' and the drm_crtc 'vrr_enabled' properties. Signed-off-by: Nicholas Kazlauskas Cc: Harry Wentland Cc: Manasi Navare Cc: Pekka Paalanen Cc: Ville Syrjälä Cc: Michel Dänzer --- Documentation/gpu/drm-kms.rst | 7 drivers/gpu/drm

[PATCH v6 1/5] drm: Add vrr_capable property to the drm connector

2018-11-06 Thread Nicholas Kazlauskas
g variable refresh rates using drm_connector_attach_vrr_capable_property(). The value should be updated based on driver and hardware capabiltiy by using drm_connector_set_vrr_capable_property(). Signed-off-by: Nicholas Kazlauskas Reviewed-by: Manasi Navare Reviewed-by: Harry Wentland --- drive

[PATCH v6 2/5] drm: Add vrr_enabled property to drm CRTC

2018-11-06 Thread Nicholas Kazlauskas
to implement support. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Cc: Manasi Navare --- drivers/gpu/drm/drm_atomic_uapi.c | 4 drivers/gpu/drm/drm_crtc.c| 2 ++ drivers/gpu/drm/drm_mode_config.c | 6 ++ include/drm/drm_crtc.h| 9 + include/drm

[PATCH 1/2] drm/amdgpu: Add "max_bpc" connector property

2018-11-07 Thread Nicholas Kazlauskas
convetion is already in use for other drivers. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h| 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/g

[PATCH 2/2] drm/amd/display: Support "max_bpc" connector property

2018-11-07 Thread Nicholas Kazlauskas
. This was the old default before the range was uncapped. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/display

[PATCH v2 3/3] drm/amd/display: Set FreeSync state using DRM VRR properties

2018-09-24 Thread Nicholas Kazlauskas
that the current implementation treats variable_refresh_enabled as a strict requirement for sending the VRR enable *or* disable packet. Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 232 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 6 +- 2

[PATCH v2 2/3] drm: Add variable refresh property to DRM CRTC

2018-09-24 Thread Nicholas Kazlauskas
is atomic it isn't filtered from legacy userspace queries. This allows for Xorg userspace drivers to implement support in non-atomic setups. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_atomic_helper.c | 1 + drivers/gpu/drm/drm_atomic_uapi.c | 6 ++ drivers/gpu/drm/drm_crtc.c

[PATCH v2 0/3] A DRM API for adaptive sync and variable refresh rate support

2018-09-24 Thread Nicholas Kazlauskas
://lists.freedesktop.org/archives/dri-devel/2017-October/155207.html https://lists.freedesktop.org/archives/dri-devel/2018-September/189404.html Nicholas Kazlauskas Nicholas Kazlauskas (3): drm: Add variable refresh rate properties to connector drm: Add variable refresh property to DRM CRTC drm/amd

[PATCH v2 1/3] drm: Add variable refresh rate properties to connector

2018-09-24 Thread Nicholas Kazlauskas
is a userspace controlled option. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_atomic_uapi.c | 6 ++ drivers/gpu/drm/drm_connector.c | 35 +++ include/drm/drm_connector.h | 27 3 files changed, 68 insertions(+) diff

[PATCH] drm/amd/display: Set requested plane state DCC params for GFX9

2019-01-02 Thread Nicholas Kazlauskas
Wentland Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 90 ++- 1 file changed, 88 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index

[PATCH] drm/amd/display: Don't cleanup new cursor fb in fast cursor update

2018-12-14 Thread Nicholas Kazlauskas
if plane->state->fb != new_state->fb. A new field was added (cursor_update) to dm_plane_state that's only ever set to true during the fast path. If it's true, then cleanup_fb doesn't unpin and unref the fb. Cc: Leo Li Cc: Harry Wentland Cc: Michel Dänzer Signed-off-by: Nicholas Kazlauskas

[PATCH] drm/amd/display: Fix cursor pos and hotspot calcs

2018-12-12 Thread Nicholas Kazlauskas
-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 +++ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 01badda14079

[PATCH] drm/amd/display: Skip fast cursor updates for fb changes

2018-12-14 Thread Nicholas Kazlauskas
nce regressions for two specific IGT tests: - cursor-vs-flip-toggle - cursor-vs-flip-varying-size Cc: Leo Li Cc: Harry Wentland Cc: Michel Dänzer Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++ 1 file changed, 10 insertions(+) diff --

[PATCH] drm/amd/display: Fix NULL ptr deref for commit_planes_to_stream

2018-11-30 Thread Nicholas Kazlauskas
tps://bugs.freedesktop.org/show_bug.cgi?id=108912 Fixes: e64abff2f133 ("drm/amd/display: Use private obj helpers for dm_atomic_state") Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 in

[PATCH] drm/amd/display: Add below the range support for FreeSync

2018-12-05 Thread Nicholas Kazlauskas
low framerate compensation, "below the range". [How] Hook up the pre-flip and post-flip handlers from the FreeSync module. These adjust the minimum/maximum vrr range to duplicate frames when appropriate by tracking flip timestamps. Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nichol

Re: [PATCH] drm/amd/display: Add below the range support for FreeSync

2018-12-05 Thread Nicholas Kazlauskas
On 2018-12-05 9:30 a.m., Li, Sun peng (Leo) wrote: > > > On 2018-12-05 8:40 a.m., Nicholas Kazlauskas wrote: >> [Why] >> When application flip-rate is below the minimum vrr refresh rate. >> >> Variable refresh rate monitors extend the front porch duratio

[PATCH] drm/amd/display: Add fast path for cursor plane updates

2018-12-05 Thread Nicholas Kazlauskas
/show_bug.cgi?id=106175 Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 67 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 8 +++ 2 files changed, 73 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

Re: [PATCH] drm/amd/display: Add fast path for cursor plane updates

2018-12-05 Thread Nicholas Kazlauskas
On 2018-12-05 3:44 p.m., Grodzovsky, Andrey wrote: > > > On 12/05/2018 03:42 PM, Kazlauskas, Nicholas wrote: >> On 2018-12-05 3:26 p.m., Grodzovsky, Andrey wrote: >>> >>> On 12/05/2018 02:59 PM, Nicholas Kazlauskas wrote: >>>> [Why] >>>>

Re: [PATCH] drm/amd/display: Add fast path for cursor plane updates

2018-12-05 Thread Nicholas Kazlauskas
On 2018-12-05 3:26 p.m., Grodzovsky, Andrey wrote: > > > On 12/05/2018 02:59 PM, Nicholas Kazlauskas wrote: >> [Why] >> Legacy cursor plane updates from drm helpers go through the full >> atomic codepath. A high volume of cursor updates through this slow >> co

[PATCH] Revert "drm/amd/display: Set RMX_ASPECT as default"

2018-12-07 Thread Nicholas Kazlauskas
the native mode's refresh but this isn't always the case. For example, if the monitor is 1080p@144Hz and the preferred mode is 60Hz then even if the user selects 1080p@144Hz as their selected mode they'll get 1080p@60Hz. Cc: Bhawanpreet Lakha Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas

[PATCH] drm/amd/display: Fix duplicating scaling/underscan connector state

2018-12-07 Thread Nicholas Kazlauskas
and hangs under certain conditions. [How] Duplicate the properties. Fixes: 91b66c47ba34 ("drm/amd/display: Set RMX_ASPECT as default") Cc: Bhawanpreet Lakha Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++

[PATCH] drm/amd/display: Fix unintialized max_bpc state values

2018-11-29 Thread Nicholas Kazlauskas
r property") Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index ce00e56814ed..ede93d53e209 10

[PATCH] drm/amd/display: Fix NULL dereference when preferred_mode is NULL

2018-11-29 Thread Nicholas Kazlauskas
value. Fixes: b333730d126e ("drm/amd/display: Fix Scaling (RMX_*) for DC driver") Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdg

[PATCH v2] drm/amd/display: Add below the range support for FreeSync

2018-12-05 Thread Nicholas Kazlauskas
n appropriate by tracking flip timestamps. Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas Acked-by: Leo Li --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 79 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- 2 files changed, 62 insertions(+), 19 deletions(-) diff --

[PATCH 2/2] drm/amd/display: Remove wait for hw/flip done in atomic check

2018-11-22 Thread Nicholas Kazlauskas
. This is the case as of writing, but any future uses of dc->current_state from within atomic_check should be considered incorrect. Cc: Harry Wentland Cc: Leo Li Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 58 ++- 1 file changed, 6 insertions(+),

[PATCH 1/2] drm/amd/display: Use private obj helpers for dm_atomic_state

2018-11-22 Thread Nicholas Kazlauskas
m_state private object is now locked this should also fix issues that could arise if submitting non-blocking commits from different threads. Cc: Harry Wentland Cc: Leo Li Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 290 ++ .../gpu/d

[PATCH] drm/amd/display: Only get the connector state for VRR when toggled

2019-01-10 Thread Nicholas Kazlauskas
sing drm VRR properties") Cc: Harry Wentland Cc: Leo Li Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/disp

[PATCH 1/9] drm: Add variable refresh rate properties to DRM connector

2018-09-11 Thread Nicholas Kazlauskas
as a userspace controlled option. Change-Id: I5f60f8b57534e1d3dacda4c64c6c9106b42f4439 Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_atomic.c| 9 + drivers/gpu/drm/drm_connector.c | 35 + include/drm/drm_connector.h | 27

[PATCH 0/9] A DRM API for adaptive sync and variable refresh rate support

2018-09-11 Thread Nicholas Kazlauskas
for reference: https://lists.freedesktop.org/archives/amd-gfx/2018-April/021047.html https://lists.freedesktop.org/archives/dri-devel/2017-October/155207.html Nicholas Kazlauskas Anthony Koo (1): drm/amd/display: Refactor FreeSync module Harry Wentland (3): drm/amdgpu: fill

[PATCH 2/9] drm: Add variable refresh property to DRM CRTC

2018-09-11 Thread Nicholas Kazlauskas
is atomic it isn't filtered from legacy userspace queries. This allows for Xorg userspace drivers to implement support in non-atomic setups. Change-Id: I5a5044f48fc68fcdbcfaa5141e83b44747d7116b Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_atomic.c| 6 ++ drivers/gpu/drm

[PATCH xf86-video-amdgpu 1/6] Enable/Disable freesync when enter/exit fullscreen game v2

2018-09-11 Thread Nicholas Kazlauskas
From: Hawking Zhang v2: resolve undefined symbol in xserver 1.16 Signed-off-by: Hawking Zhang Signed-off-by: Nicholas Kazlauskas --- src/Makefile.am| 2 + src/amdgpu_dri2.c | 24 ++ src/amdgpu_drv.h | 5 ++ src/amdgpu_extension.c | 176

[PATCH xf86-video-amdgpu 0/6] xf86-video-amdgpu integration for DRM variable refresh rate API

2018-09-11 Thread Nicholas Kazlauskas
are linked below for reference: https://lists.freedesktop.org/archives/amd-gfx/2018-April/021047.html https://lists.freedesktop.org/archives/dri-devel/2017-October/155207.html Nicholas Kazlauskas Hawking Zhang (5): Enable/Disable freesync when enter/exit fullscreen game v2 Set freesync

[PATCH 6/9] drm/amdgpu: add freesync ioctl

2018-09-11 Thread Nicholas Kazlauskas
From: Harry Wentland Add the ioctl to enable/disable freesync. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 15 +++

[PATCH 7/9] drm/amd/display: Replace FreeSync props with DRM VRR props

2018-09-11 Thread Nicholas Kazlauskas
-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 50 +++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 -- 2 files changed, 18 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH 8/9] drm/amd/display: Drop FreeSync ioctl notification support

2018-09-11 Thread Nicholas Kazlauskas
This is no longer needed with the addition of the DRM properties. The base driver correctly checks that notify_freesync is non-null before calling so there shouldn't be any null pointer dereferences as a result of this. Change-Id: If0833b201c81303ca4062393e873faf3ef7c143b Signed-off-by: Nicholas

[PATCH 9/9] drm/amdgpu: Drop unneeded freesync properties from amdpgu

2018-09-11 Thread Nicholas Kazlauskas
With the introduction of new properties in DRM these amdgpu driver specific ones are no longer necessary. Change-Id: Idc88f2e3e036aacc8fe726b15db03d900e509e7c Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 drivers/gpu/drm/amd/amdgpu

[PATCH xf86-video-amdgpu 6/6] Replace amdgpu ioctl with CRTC properties for enabling FreeSync

2018-09-11 Thread Nicholas Kazlauskas
-by: Nicholas Kazlauskas --- src/amdgpu_dri2.c | 26 --- src/amdgpu_drv.h | 5 +- src/amdgpu_extension.c | 149 +++-- src/amdgpu_extension.h | 7 +- src/amdgpu_kms.c | 45 - src/amdgpu_present.c | 8 --- src/drmmode_display.c

[PATCH xf86-video-amdgpu 5/6] Do not issue freesync ioctl from present unflip

2018-09-11 Thread Nicholas Kazlauskas
From: Hawking Zhang It prefers that freesync is enable/disable per client lifecycle rather than per flip. With the patch, freesync will be disabled when clientgone or switch to windowed mode. Change-Id: I2c725bd045c4855f9e1436f0791755b0a47a6ecc Signed-off-by: Hawking Zhang Reviewed-by: Flora

[PATCH xf86-video-amdgpu 4/6] Handle Alt+Tab case when freesync enabled in steam client v2

2018-09-11 Thread Nicholas Kazlauskas
From: Hawking Zhang v2: fix ddx build warning unused var The change supports the following scenario when freesync enabled for steam game 1). use Alt+Tab to run-time switch between windowed mode and fullscreen mode 2). use option setting to switch between windowed mode and fullscreen mode Also

[PATCH 3/9] drm/amdgpu: fill in amdgpu_dm_remove_sink_from_freesync_module

2018-09-11 Thread Nicholas Kazlauskas
From: Harry Wentland Add code to tear down freesync modules when disabled. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 40 ++- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git

[PATCH 5/9] drm/amdgpu/display: add freesync drm properties

2018-09-11 Thread Nicholas Kazlauskas
From: Harry Wentland Add connector properties for controlling freesync. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4

[PATCH xf86-video-amdgpu 2/6] Set freesync capability when client has fullscreen size drawable

2018-09-11 Thread Nicholas Kazlauskas
From: Hawking Zhang OGL send freesync request to ddx driver when it makes a drawable as current DDX driver only set the client to be freesync capable when it is a fullscreen size one. Change-Id: Ie25ff11f58104546c52a253d6a5f85aa62532d4d Signed-off-by: Hawking Zhang Reviewed-by: Flora Cui ---

[PATCH xf86-video-amdgpu 3/6] Do not fail the X request when there is just BadDrawable/BadMatch

2018-09-11 Thread Nicholas Kazlauskas
From: Hawking Zhang There is BadDrawable/BadMatch case for dixLookupDrawable. But DDX driver don't need to fail the request with BadValue. Instead, only make sure the drawable is successfully found and check its size Change-Id: I1ca6e04d611b2d5e81a54e500c90fb1644675f67 Signed-off-by: Hawking

[PATCH] drm/amd/display: Use div_u64 for flip timestamp ns to ms

2018-12-19 Thread Nicholas Kazlauskas
Resolves __udivdi3 missing errors when building for i386. Fixes: 6378ef012ddc ("drm/amd/display: Add below the range support for FreeSync") Change-Id: I4ded5790160054e6908367f20a63257225517714 Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/a

[PATCH] drm/amd/display - Don't leak memory when updating streams

2019-01-28 Thread Nicholas Kazlauskas
t;drm/amd/display: Call into DC once per multiplane flip") Fixes: ea39594e0855 ("drm/amd/display: Perform plane updates only when needed") Cc: Michel Dänzer Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH] drm/amd/display: Remove semicolon from to_dm_plane_state definition

2019-03-25 Thread Nicholas Kazlauskas
The extra ; in the macro definition creates an empty statement preventing any variable declarations from occuring after any use of to_dm_plane_state(...). Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH 07/18] drm/amd/display: Create overlay planes

2019-02-27 Thread Nicholas Kazlauskas
On 2019-02-26 11:03 p.m., Vishwakarma, Pratik wrote: > > On 2/26/2019 4:16 AM, Bhawanpreet Lakha wrote: >> From: Nicholas Kazlauskas >> >> [Why] >> Raven has support for combining pipes for DRM_PLANE_TYPE_OVERLAY use >> but no overlays are exposed to user

[PATCH] drm/amdgpu: Bump amdgpu version for per-flip plane tiling updates

2019-02-28 Thread Nicholas Kazlauskas
To help xf86-video-amdgpu and mesa know DC supports updating the tiling attributes for a framebuffer per-flip. Cc: Michel Dänzer Cc: Marek Olšák Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/amd/display: Drop atomic_obj_lock for private obj

2019-03-05 Thread Nicholas Kazlauskas
and Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu

[PATCH] drm/amd/display: Don't ASSERT when total_planes == AMDGPU_MAX_PLANES

2019-03-05 Thread Nicholas Kazlauskas
[Why] Can happen on ASICs with 6 planes, but this isn't a bug since we haven't written outside the array. [How] Use <= instead of <. Cc: Leo Li Cc: Michel Dänzer Reported-by: Michel Dänzer Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2

[PATCH] drm/amd/display: Only put primary planes into the mode_info->planes list

2019-03-14 Thread Nicholas Kazlauskas
eed to be explicitly cleaned up are the ones that have failed to register. By dropping the explicit free on every plane in the mode_info->planes list this patch also fixes a double-free in the case where we fail to initialize only some of the planes. Cc: Leo Li Cc: Harry Wentland Signed-off-by: Ni

[PATCH] drm/amd/display: Fix plane address updates for video surface formats

2019-03-11 Thread Nicholas Kazlauskas
, during amdgpu_dm_commit_planes We use the fill_plane_tiling_attributes in all 3 locations and it already needs the address to update DCC attributes, so the surface address update logic can be moved into this helper. Cc: Leo Li Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display

[PATCH] drm/amd/display: Respect DRM framebuffer info for video surfaces

2019-03-13 Thread Nicholas Kazlauskas
since the chroma plane is half size of the luma plane for NV12. Leave a TODO indicating that those should be set based on the actual surface format instead since this is only correct for YUV420 formats. Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/d

[PATCH] drm/amdgpu: Clear VRAM for DRM dumb_create buffers

2019-03-08 Thread Nicholas Kazlauskas
. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index fcaaac30e84b..a58072bbc9b8 100644 --- a/drivers/gpu/drm/amd

[PATCH] drm/amdgpu: Only clear dumb buffers if ring is enabled

2019-03-11 Thread Nicholas Kazlauskas
The buffers should be cleared when possible but we also don't want buffer creation to fail in the rare case where the ring isn't ready during the call. This could happen during some suspend/resume sequences. Cc: Christian König Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amd/display: Only allow VRR when vrefresh is within supported range

2019-03-21 Thread Nicholas Kazlauskas
in the low range but it didn't cover the upper range. Expand the condition to include both. Cc: Sun peng Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH] drm/amd/display: Initialize stream_update with memset

2019-03-22 Thread Nicholas Kazlauskas
The brace initialization used here generates errors on some compilers. Use memset to make this more portable. Cc: Sun peng Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH v2] drm/amd/display: Add debugfs entry for amdgpu_dm_visual_confirm

2019-03-22 Thread Nicholas Kazlauskas
confirm enum value using the debugfs attribute helpers. The debugfs_create_file_unsafe can be used instead of debugfs_create_file as per the documentation. v2: Use debugfs helpers for getting and setting the value (Christian) Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas

[PATCH v2] drm/amd/display: Initialize stream_update with memset

2019-03-22 Thread Nicholas Kazlauskas
memset to make this more portable. v2: Specify the compiler / diagnostic in the commit message (Paul) Cc: Sun peng Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: "ring gfx timeout" with Vega 64 on mesa 19.0.0-rc2 and kernel 5.0.0-rc6 (GPU reset still not works)

2019-02-12 Thread Nicholas Kazlauskas
buffer. Nicholas Kazlauskas On 2/12/19 12:46 PM, Grodzovsky, Andrey wrote: > I suspect the issue is that amdgpu_dm_do_flip is holding the BO reserved > and then stack waiting for fences to signal in > reservation_object_wait_timeout_rcu (which won't signal because there > wa

[PATCH] drm/amd/display: Attach VRR properties for eDP connectors

2019-01-31 Thread Nicholas Kazlauskas
[Why] eDP was missing in the checks for supported VRR connectors. [How] Attach the properties for eDP connectors too. Cc: Leo Li Cc: Harry Wentland Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202449 Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH] drm/amd/display: Expose connector VRR range via debugfs

2019-01-24 Thread Nicholas Kazlauskas
[Why] It's useful to know the min and max vrr range for IGT testing. [How] Expose the min and max vfreq for the connector via a debugfs file on the connector, "vrr_range". Example usage: cat /sys/kernel/debug/dri/0/DP-1/vrr_range Cc: Harry Wentland Cc: Leo Li Signed-off-by

[PATCH] drm/amd/display: Don't re-enable CRC when CONFIG_DEBUG_FS isn't defined

2019-02-04 Thread Nicholas Kazlauskas
: 43a6a02eb355 ("drm/amd/display: Re-enable CRC capture following modeset") Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH] drm/amd/display: Add debugfs entry for amdgpu_dm_visual_confirm

2019-03-15 Thread Nicholas Kazlauskas
confirm enum value. Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 77 ++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu

[PATCH] drm/amd/display: Always allocate initial connector state state

2019-06-04 Thread Nicholas Kazlauskas
. [How] Use our reset helper to allocate an initial state and reset the values to their defaults. We were already doing this before, just not for MST connectors. Cc: Leo Li Cc: Roman Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH 0/2] drm/amd/display: Add HDR output metadata support for amdgpu

2019-05-28 Thread Nicholas Kazlauskas
and exiting HDR but the metadata can be changed without one. Cc: Harry Wentland Nicholas Kazlauskas (2): drm/amd/display: Expose HDR output metadata for supported connectors drm/amd/display: Only force modesets when toggling HDR .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 155

[PATCH 1/2] drm/amd/display: Expose HDR output metadata for supported connectors

2019-05-28 Thread Nicholas Kazlauskas
unnecessary. The requirement can later be reduced to just entering and exiting HDR or switching max bpc. Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 125 ++ 1 file changed, 125 insertions(+) diff --git a/drivers/gpu/drm/amd

[PATCH 2/2] drm/amd/display: Only force modesets when toggling HDR

2019-05-28 Thread Nicholas Kazlauskas
the stream update. This will only happen in non-modeset cases. Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 34 +++ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH] drm/amd/display: Add back missing hw translate init for DCN1_01

2019-05-31 Thread Nicholas Kazlauskas
: 97df424fe7a7 ("drm/amd/display: Drop DCN1_01 guards") Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_t

  1   2   >