From: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
[ Upstream commit a8f196a0fa6391a436f63f360a1fb57031fdf26c ]
On VLV/CHV there is some kind of linkage between the cdclk frequency
and the DP link frequency. The spec says:
"For DP audio configuration, cdclk frequency shall be set to
meet the following requirements:
DP Link Frequency(MHz) | Cdclk frequency(MHz)
270 | 320 or higher
162 | 200 or higher"
I suspect that would more accurately be …
[View More]expressed as
"cdclk >= DP link clock", and in any case we can express it like
that in the code because of the limited set of cdclk (200, 266,
320, 400 MHz) and link frequencies (162 and 270 MHz) we support.
Without this we can end up in a situation where the cdclk
is too low and enabling DP audio will kill the pipe. Happens
eg. with 2560x1440 modes where the 266MHz cdclk is sufficient
to pump the pixels (241.5 MHz dotclock) but is too low for
the DP audio due to the link frequency being 270 MHz.
v2: Spell out the cdclk and link frequencies we actually support
Cc: stable(a)vger.kernel.org
Tested-by: Stefan Gottwald <gottwald(a)igel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111149
Signed-off-by: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190717114536.22937-1-ville.…
Acked-by: Chris Wilson <chris(a)chris-wilson.co.uk>
(cherry picked from commit bffb31f73b29a60ef693842d8744950c2819851d)
Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/gpu/drm/i915/intel_cdclk.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
index ae40a8679314e..fd5236da039fb 100644
--- a/drivers/gpu/drm/i915/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/intel_cdclk.c
@@ -2269,6 +2269,17 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
if (crtc_state->has_audio && INTEL_GEN(dev_priv) >= 9)
min_cdclk = max(2 * 96000, min_cdclk);
+ /*
+ * "For DP audio configuration, cdclk frequency shall be set to
+ * meet the following requirements:
+ * DP Link Frequency(MHz) | Cdclk frequency(MHz)
+ * 270 | 320 or higher
+ * 162 | 200 or higher"
+ */
+ if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
+ intel_crtc_has_dp_encoder(crtc_state) && crtc_state->has_audio)
+ min_cdclk = max(crtc_state->port_clock, min_cdclk);
+
/*
* On Valleyview some DSI panels lose (v|h)sync when the clock is lower
* than 320000KHz.
--
2.20.1
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=110659
--- Comment #63 from Michel Dänzer <michel(a)daenzer.net> ---
Can you find out which property is getting set? If there's no (easy) way to get
that out of the kernel, one possibility is to (from another machine via SSH)
attach gdb to the Xorg process while an affected app is running, set
breakpoints in drmModeConnectorSetProperty and drmModeObjectSetProperty, and
get backtraces of where they're getting called from.
--
You are receiving …
[View More]this mail because:
You are the assignee for the bug.
[View Less]
Noticed while reviewing code. I'm not sure whether this might or might
not explain some of the missed vblank hilarity we've been seeing. I
think those all go through the vblank completion event, which has
unconditional barriers - it always takes the spinlock. Therefore no
cc stable.
v2:
- Barrriers are hard, put them in in the right order (Chris).
- Improve the comments a bit.
Cc: Rodrigo Siqueira <rodrigosiqueiramelo(a)gmail.com>
Cc: Chris Wilson <chris(a)chris-wilson.co.uk>
…
[View More]Signed-off-by: Daniel Vetter <daniel.vetter(a)intel.com>
---
drivers/gpu/drm/drm_vblank.c | 38 +++++++++++++++++++++++++++++++++++-
include/drm/drm_vblank.h | 13 +++++++++++-
2 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 603ab105125d..eb2a8304536c 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -295,11 +295,23 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
static u64 drm_vblank_count(struct drm_device *dev, unsigned int pipe)
{
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
+ u64 count;
if (WARN_ON(pipe >= dev->num_crtcs))
return 0;
- return vblank->count;
+ count = vblank->count;
+
+ /*
+ * This read barrier corresponds to the implicit write barrier of the
+ * write seqlock in store_vblank(). Note that this is the only place
+ * where we need an explicit barrier, since all other access goes
+ * through drm_vblank_count_and_time(), which already has the required
+ * read barrier curtesy of the read seqlock.
+ */
+ smp_rmb();
+
+ return count;
}
/**
@@ -764,6 +776,14 @@ drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe,
* vblank interrupt (since it only reports the software vblank counter), see
* drm_crtc_accurate_vblank_count() for such use-cases.
*
+ * Note that for a given vblank counter value drm_crtc_handle_vblank()
+ * and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time()
+ * provide a barrier: Any writes done before calling
+ * drm_crtc_handle_vblank() will be visible to callers of the later
+ * functions, iff the vblank count is the same or a later one.
+ *
+ * See also &drm_vblank_crtc.count.
+ *
* Returns:
* The software vblank counter.
*/
@@ -818,6 +838,14 @@ static u64 drm_vblank_count_and_time(struct drm_device *dev, unsigned int pipe,
* vblank events since the system was booted, including lost events due to
* modesetting activity. Returns corresponding system timestamp of the time
* of the vblank interval that corresponds to the current vblank counter value.
+ *
+ * Note that for a given vblank counter value drm_crtc_handle_vblank()
+ * and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time()
+ * provide a barrier: Any writes done before calling
+ * drm_crtc_handle_vblank() will be visible to callers of the later
+ * functions, iff the vblank count is the same or a later one.
+ *
+ * See also &drm_vblank_crtc.count.
*/
u64 drm_crtc_vblank_count_and_time(struct drm_crtc *crtc,
ktime_t *vblanktime)
@@ -1791,6 +1819,14 @@ EXPORT_SYMBOL(drm_handle_vblank);
*
* This is the native KMS version of drm_handle_vblank().
*
+ * Note that for a given vblank counter value drm_crtc_handle_vblank()
+ * and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time()
+ * provide a barrier: Any writes done before calling
+ * drm_crtc_handle_vblank() will be visible to callers of the later
+ * functions, iff the vblank count is the same or a later one.
+ *
+ * See also &drm_vblank_crtc.count.
+ *
* Returns:
* True if the event was successfully handled, false on failure.
*/
diff --git a/include/drm/drm_vblank.h b/include/drm/drm_vblank.h
index e528bb2f659d..5ec623740158 100644
--- a/include/drm/drm_vblank.h
+++ b/include/drm/drm_vblank.h
@@ -110,7 +110,18 @@ struct drm_vblank_crtc {
seqlock_t seqlock;
/**
- * @count: Current software vblank counter.
+ * @count:
+ *
+ * Current software vblank counter.
+ *
+ * Note that for a given vblank counter value drm_crtc_handle_vblank()
+ * and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time()
+ * provide a barrier: Any writes done before calling
+ * drm_crtc_handle_vblank() will be visible to callers of the later
+ * functions, iff the vblank count is the same or a later one.
+ *
+ * IMPORTANT: This guarantee requires barriers, therefor never access
+ * this field directly. Use drm_crtc_vblank_count() instead.
*/
u64 count;
/**
--
2.22.0
[View Less]
On 9/3/19 3:17 AM, Stephen Rothwell wrote:
> Hi all,
>
> News: I will only be doing 1 more release before I leave for Kernel
> Summit (there may be some reports on Thursday, but I doubt I will have
> time to finish the full release) and then no more until Sept 30.
>
> Changes since 20190902:
>
on i386:
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.o
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘…
[View More]dcn21_ipp_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:641:3: error: implicit declaration of function ‘kzalloc’; did you mean ‘d_alloc’? [-Werror=implicit-function-declaration]
kzalloc(sizeof(struct dcn10_ipp), GFP_KERNEL);
^~~~~~~
d_alloc
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:641:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_dpp_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:658:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct dcn20_dpp), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:668:2: error: implicit declaration of function ‘kfree’; did you mean ‘ida_free’? [-Werror=implicit-function-declaration]
kfree(dpp);
^~~~~
ida_free
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_aux_engine_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:677:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct aux_engine_dce110), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_i2c_hw_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:712:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct dce_i2c_hw), GFP_KERNEL);
^~~~~~~
CC [M] drivers/gpu/drm/i915/display/intel_atomic_plane.o
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_validate_bandwidth’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1068:38: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_clock_source_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1126:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct dce110_clk_src), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_hubp_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1146:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct dcn21_hubp), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_hubbub_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1164:32: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct dcn20_hubbub *hubbub = kzalloc(sizeof(struct dcn20_hubbub),
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_opp_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1192:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct dcn20_opp), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_timing_generator_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1209:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct optc), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_mpc_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1228:28: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct dcn20_mpc *mpc20 = kzalloc(sizeof(struct dcn20_mpc),
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_pp_smu_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1333:32: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct pp_smu_funcs *pp_smu = kzalloc(sizeof(*pp_smu), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_stream_encoder_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1367:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct dcn10_stream_encoder), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_hwseq_create’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1394:26: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct dce_hwseq *hws = kzalloc(sizeof(struct dce_hwseq), GFP_KERNEL);
^~~~~~~
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function ‘dcn21_create_resource_pool’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:1669:3: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
kzalloc(sizeof(struct dcn21_resource_pool), GFP_KERNEL);
^~~~~~~
Full randconfig file is attached.
--
~Randy
[View Less]
Hi, Christoph,
On 9/3/19 3:46 PM, Christoph Hellwig wrote:
> On Tue, Sep 03, 2019 at 03:15:01PM +0200, Thomas Hellström (VMware) wrote:
>> From: Thomas Hellstrom <thellstrom(a)vmware.com>
>>
>> The force_dma_unencrypted symbol is needed by TTM to set up the correct
>> page protection when memory encryption is active. Export it.
> NAK. This is a helper for the core DMA code and drivers have no
> business looking at it.
Is this a layer violation concern, …
[View More]that is, would you be ok with a
similar helper for TTM, or is it that you want to force the graphics
drivers into adhering strictly to the DMA api, even when it from an
engineering perspective makes no sense?
If it's the latter, then I would like to reiterate that it would be
better that we work to come up with a long term plan to add what's
missing to the DMA api to help graphics drivers use coherent memory?
Thanks,
Thomas
[View Less]
Support for HDR10 video was introduced in DisplayPort 1.4.
On GLK+ platform, in order to use DisplayPort HDR10, we need to support
BT.2020 colorimetry and HDR Static metadata.
It implements the CTA-861-G standard for transport of static HDR metadata.
It enables writing of HDR metadata infoframe SDP to the panel.
The HDR Metadata will be provided by userspace compositors, based on
blending policies and passed to the driver through a blob property.
And It refactors, renames and extends a function …
[View More]which handled vsc sdp
header and data block setup for supporting colorimetry format.
And It attaches the colorspace connector property and HDR metadata property
to a DisplayPort connector.
These patches tested on below test environment.
Test Environment:
- Tested System: GLK and Gen11 platform.
- Monitor: Dell UP2718Q 4K HDR Monitor.
- In order to test DP HDR10, test environment uses patched Kodi-gbm,
patched Media driver and HDR10 video.
You can find these on below.
[patched Kodi-gbm]
- repo: https://github.com/Kwiboo/xbmc/tree/drmprime-hdr
[download 4K HDR video file]
- link: https://4kmedia.org/lg-new-york-hdr-uhd-4k-demo/
[Media Driver for GLK]
- repo https://gitlab.freedesktop.org/emersion/intel-vaapi-driver
master branch
[Media Driver for ICL]
- repo: https://github.com/harishkrupo/media-driver/tree/p010_composite
v2:
- Add a missed blank line after function declaration.
- Remove useless parentheses.
- Minor style fix.
Gwan-gyeong Mun (6):
drm/i915/dp: Extend program of VSC Header and DB for Colorimetry
Format
drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA
drm: Add DisplayPort colorspace property
drm/i915/dp: Attach colorspace property
drm/i915/dp: Program an Infoframe SDP Header and DB for HDR Static
Metadata
drm/i915/dp: Attach HDR metadata property to DP connector
drivers/gpu/drm/drm_connector.c | 4 +-
drivers/gpu/drm/i915/display/intel_ddi.c | 11 +-
drivers/gpu/drm/i915/display/intel_display.h | 2 -
.../drm/i915/display/intel_display_types.h | 3 +
drivers/gpu/drm/i915/display/intel_dp.c | 191 ++++++++++++++++--
drivers/gpu/drm/i915/display/intel_dp.h | 7 +
drivers/gpu/drm/i915/i915_reg.h | 1 +
7 files changed, 199 insertions(+), 20 deletions(-)
--
2.22.0
[View Less]