Hi Dave and Daniel,
This v2 contains a critical DP-MST fix that it would be really good to be
propagated as soon as possible.
Besides all the drm-intel-next-fixes that I mentioned on previous email.
Here goes drm-intel-fixes-2019-10-03-1:
- Fix DP-MST crtc_mask
- Fix dsc dpp calculations
- Fix g4x sprite scaling stride check with GTT remapping
Short summary of fixes pull (less than what git shortlog provides):
- explain anything non-fixes (e.g. cleanups) and why it's appropriate
- highlight …
[View More]regressions
- summarize pull requests contained
This shouldn't be more than a few lines (or it indicates your fixes pull is a
bit too big).
Thanks,
Rodrigo.
The following changes since commit 54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c:
Linux 5.4-rc1 (2019-09-30 10:35:40 -0700)
are available in the Git repository at:
git://anongit.freedesktop.org/drm/drm-intel tags/drm-intel-fixes-2019-10-03-1
for you to fetch changes up to 485f682be9fc8d41376936a3b01423edd07b9a75:
Revert "drm/i915: Fix DP-MST crtc_mask" (2019-10-03 12:23:07 -0700)
----------------------------------------------------------------
- Fix DP-MST crtc_mask
- Fix dsc dpp calculations
- Fix g4x sprite scaling stride check with GTT remapping
Short summary of fixes pull (less than what git shortlog provides):
- explain anything non-fixes (e.g. cleanups) and why it's appropriate
- highlight regressions
- summarize pull requests contained
This shouldn't be more than a few lines (or it indicates your fixes pull is a
bit too big).
----------------------------------------------------------------
Maarten Lankhorst (1):
drm/i915/dp: Fix dsc bpp calculations, v5.
Ville Syrjälä (2):
drm/i915: Fix g4x sprite scaling stride check with GTT remapping
Revert "drm/i915: Fix DP-MST crtc_mask"
drivers/gpu/drm/i915/display/intel_display.c | 12 +-
drivers/gpu/drm/i915/display/intel_display.h | 2 +-
drivers/gpu/drm/i915/display/intel_dp.c | 184 ++++++++++++++-------------
drivers/gpu/drm/i915/display/intel_dp.h | 6 +-
drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 +-
drivers/gpu/drm/i915/display/intel_sprite.c | 5 +-
6 files changed, 111 insertions(+), 102 deletions(-)
[View Less]
I'm embarassed to say that even though I've touched
vop_crtc_mode_fixup() twice and I swear I tested it, there's still a
stupid glaring bug in it. Specifically, on veyron_minnie (with all
the latest display timings) we want to be setting our pixel clock to
66,666,666.67 Hz and we tell userspace that's what we set, but we're
actually choosing 66,000,000 Hz. This is confirmed by looking at the
clock tree.
The problem is that in drm_display_mode_from_videomode() we convert
from Hz to kHz with:
…
[View More] dmode->clock = vm->pixelclock / 1000;
...so when the device tree specifies a clock of 66666667 for the panel
then DRM translates that to 66666000. The clock framework will always
pick a clock that is _lower_ than the one requested, so it will refuse
to pick 66666667 and we'll end up at 66000000.
While we could try to fix drm_display_mode_from_videomode() to round
to the nearest kHz and it would fix our problem, it wouldn't help if
the clock we actually needed was 60,000,001 Hz. We could
alternatively have DRM always round up, but maybe this would break
someone else who already baked in the assumption that DRM rounds down.
Let's solve this by just adding 999 Hz before calling
clk_round_rate(). This should be safe and work everywhere.
NOTE: if this is picked to stable, it's probably easiest to first pick
commit 527e4ca3b6d1 ("drm/rockchip: Base adjustments of the mode based
on prev adjustments") which shouldn't hurt in stable.
Fixes: b59b8de31497 ("drm/rockchip: return a true clock rate to adjusted_mode")
Signed-off-by: Douglas Anderson <dianders(a)chromium.org>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 37 +++++++++++++++++++--
1 file changed, 34 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 613404f86668..84e3decb17b1 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1040,10 +1040,41 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,
struct drm_display_mode *adjusted_mode)
{
struct vop *vop = to_vop(crtc);
+ unsigned long rate;
- adjusted_mode->clock =
- DIV_ROUND_UP(clk_round_rate(vop->dclk,
- adjusted_mode->clock * 1000), 1000);
+ /*
+ * Clock craziness.
+ *
+ * Key points:
+ *
+ * - DRM works in in kHz.
+ * - Clock framework works in Hz.
+ * - Rockchip's clock driver picks the clock rate that is the
+ * same _OR LOWER_ than the one requested.
+ *
+ * Action plan:
+ *
+ * 1. When DRM gives us a mode, we should add 999 Hz to it. That way
+ * if the clock we need is 60000001 Hz (~60 MHz) and DRM tells us to
+ * make 60000 kHz then the clock framework will actually give us
+ * the right clock.
+ *
+ * NOTE: if the PLL (maybe through a divider) could actually make
+ * a clock rate 999 Hz higher instead of the one we want then this
+ * could be a problem. Unfortunately there's not much we can do
+ * since it's baked into DRM to use kHz. It shouldn't matter in
+ * practice since Rockchip PLLs are controlled by tables and
+ * even if there is a divider in the middle I wouldn't expect PLL
+ * rates in the table that are just a few kHz different.
+ *
+ * 2. Get the clock framework to round the rate for us to tell us
+ * what it will actually make.
+ *
+ * 3. Store the rounded up rate so that we don't need to worry about
+ * this in the actual clk_set_rate().
+ */
+ rate = clk_round_rate(vop->dclk, adjusted_mode->clock * 1000 + 999);
+ adjusted_mode->clock = DIV_ROUND_UP(rate, 1000);
return true;
}
--
2.23.0.444.g18eeb5a265-goog
[View Less]
Hi Dave and Daniel,
I know you are on XDC and I was even considering not send any this week,
but let me send this before I forget.
There are the drm-intel-next-fixes pull requests that I had sent
that are still needed and it would be good if you could pull those.
Besides we have more 2 fixes here.
If necessary and easier I can send all fixes together next week, including
the ones missed on -rc1 and these ones here plus any upcoming.
Just let me know how you prefer.
Here goes drm-intel-…
[View More]fixes-2019-10-03:
- Fix dsc dpp calculations
- Fix g4x sprite scaling stride check with GTT remapping
Thanks,
Rodrigo.
The following changes since commit 54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c:
Linux 5.4-rc1 (2019-09-30 10:35:40 -0700)
are available in the Git repository at:
git://anongit.freedesktop.org/drm/drm-intel tags/drm-intel-fixes-2019-10-03
for you to fetch changes up to eb0192fed016db1c5a9701cd6ca47233ff4a43e5:
drm/i915: Fix g4x sprite scaling stride check with GTT remapping (2019-10-02 22:20:33 -0700)
----------------------------------------------------------------
- Fix dsc dpp calculations
- Fix g4x sprite scaling stride check with GTT remapping
----------------------------------------------------------------
Maarten Lankhorst (1):
drm/i915/dp: Fix dsc bpp calculations, v5.
Ville Syrjälä (1):
drm/i915: Fix g4x sprite scaling stride check with GTT remapping
drivers/gpu/drm/i915/display/intel_display.c | 12 +-
drivers/gpu/drm/i915/display/intel_display.h | 2 +-
drivers/gpu/drm/i915/display/intel_dp.c | 184 ++++++++++++++-------------
drivers/gpu/drm/i915/display/intel_dp.h | 6 +-
drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
drivers/gpu/drm/i915/display/intel_sprite.c | 5 +-
6 files changed, 110 insertions(+), 101 deletions(-)
[View Less]
This fixes the following kernel-doc warnings and makes the corrsponding fields
show up in the generated HTML:
./drivers/gpu/drm/i915/i915_drv.h:1143: warning: Incorrect use of kernel-doc format: * State of the OA buffer.
./drivers/gpu/drm/i915/i915_drv.h:1154: warning: Incorrect use of kernel-doc format: * Locks reads and writes to all head/tail state
./drivers/gpu/drm/i915/i915_drv.h:1176: warning: Incorrect use of kernel-doc format: * One 'aging' …
[View More]tail pointer and one 'aged' tail pointer ready to
./drivers/gpu/drm/i915/i915_drv.h:1188: warning: Incorrect use of kernel-doc format: * Index for the aged tail ready to read() data up to.
./drivers/gpu/drm/i915/i915_drv.h:1193: warning: Incorrect use of kernel-doc format: * A monotonic timestamp for when the current aging tail pointer
./drivers/gpu/drm/i915/i915_drv.h:1199: warning: Incorrect use of kernel-doc format: * Although we can always read back the head pointer register,
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
---
drivers/gpu/drm/i915/i915_drv.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 772154e4073e..55782e78f026 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1140,7 +1140,7 @@ struct i915_perf_stream {
int period_exponent;
/**
- * State of the OA buffer.
+ * @oa_buffer: State of the OA buffer.
*/
struct {
struct i915_vma *vma;
@@ -1151,6 +1151,7 @@ struct i915_perf_stream {
int size_exponent;
/**
+ * @oa_buffer.ptr_lock:
* Locks reads and writes to all head/tail state
*
* Consider: the head and tail pointer state needs to be read
@@ -1173,6 +1174,7 @@ struct i915_perf_stream {
spinlock_t ptr_lock;
/**
+ * @oa_buffer.tails:
* One 'aging' tail pointer and one 'aged' tail pointer ready to
* used for reading.
*
@@ -1185,17 +1187,20 @@ struct i915_perf_stream {
} tails[2];
/**
+ * @oa_buffer.aged_tail_idx:
* Index for the aged tail ready to read() data up to.
*/
unsigned int aged_tail_idx;
/**
+ * @oa_buffer.aging_timestamp:
* A monotonic timestamp for when the current aging tail pointer
* was read; used to determine when it is old enough to trust.
*/
u64 aging_timestamp;
/**
+ * @oa_buffer.head:
* Although we can always read back the head pointer register,
* we prefer to avoid trusting the HW state, just to avoid any
* risk that some hardware condition could * somehow bump the
--
2.20.1
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=111896
Andre Klapper <a9016009(a)gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|cleanup0407 |
Resolution|--- |INVALID
Group| |spam
Component|General |Two
Product|DRI |…
[View More]Spam
Version|XOrg git |unspecified
URL|http://mu.ac.in/portal/ |
Status|ASSIGNED |RESOLVED
--- Comment #1 from Andre Klapper <a9016009(a)gmx.de> ---
Go away, test somewhere else, and tell your teachers at http://mu.ac.in that
this is not a playground.
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=111897
Andre Klapper <a9016009(a)gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|General |Two
Product|DRI |Spam
Version|XOrg git |unspecified
URL|http://mu.ac.in |
Status|ASSIGNED …
[View More] |RESOLVED
Group| |spam
Resolution|--- |INVALID
--- Comment #1 from Andre Klapper <a9016009(a)gmx.de> ---
Go away, test somewhere else, and tell your teachers at http://mu.ac.in/portal/
that this is not a playground.
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]