Re: [RFCv1 11/12] drm: Atomic modeset ioctl

2013-10-08 Thread Matt Roper
; + __u64 user_data; +}; + #endif -- 1.8.3.1 -- Ville Syrjälä Intel OTC -- Ville Syrjälä Intel OTC ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Matt

Re: [PATCH 4/4] drm: Resurrect atomic rmfb code, v2

2017-01-24 Thread Matt Roper
e CRTC on, but also preserve the framebuffer and leave the planes on; that wound up causing some kind of regression for vmwgfx, but I'm unclear on the details there. I'd suggest getting an Ack from one of the vmware guys to ensure that the less drastic change in behavior here won't cau

[PATCH v5 1/6] drm/i915/skl: Add support for the SAGV, fix underrun hangs

2016-08-02 Thread Matt Roper
te(): (temp & 0x1) indicates disabled, 0x0 >enabled > - Call skl_sagv_enable/disable() from pre/post-plane updates > Changes since v3: > - Use time_before() to compare timeout to jiffies > Changes since v2: > - Really apply minor style nitpicks to patch this time >

[PATCH v5 3/6] drm/i915/skl: Update plane watermarks atomically during plane updates

2016-08-02 Thread Matt Roper
vblank evasion > > Changes since v3: > - Rebase against new SAGV patch changes > > Changes since v4: > - Add a parameter to choose what skl_wm_values struct to use when >writing new plane watermarks > > Fixes: 2d41c0b59afc ("drm/i915/skl: SKL Watermark C

[PATCH v5 4/6] drm/i915/skl: Ensure pipes with changed wms get added to the state

2016-08-02 Thread Matt Roper
ate if we have a change in active pipes. I think what you meant to write was "...we'll need to modify the watermarks on all active *planes*. Since those *planes* won't..." Aside from the commit message, I believe the logic is correct, so you can consider this Reviewed-by: M

[PATCH v5 5/6] drm/i915: Move CRTC updating in atomic_commit into it's own hook

2016-08-02 Thread Matt Roper
his patch will need to be changed for > such backports first] > Cc: Ville Syrjälä > Cc: Daniel Vetter > Cc: Radhakrishna Sripada > Cc: Hans de Goede > Cc: Matt Roper > --- > drivers/gpu/drm/i915/i915_drv.h | 2 + > drivers/gpu/drm/i915/intel_display.c | 74 &

[PATCH v5 6/6] drm/i915/skl: Update DDB values atomically with wms/plane attrs

2016-08-02 Thread Matt Roper
8211bd5bdf5e ("drm/i915/skl: Program the DDB allocation") > Signed-off-by: Lyude > [omitting CC for stable, since this patch will need to be changed for > such backports first] > Cc: Ville Syrjälä > Cc: Daniel Vetter > Cc: Radhakrishna Sripada > Cc: Hans de Goede

[PATCH v7] drm/i915/skl: Add support for the SAGV, fix underrun hangs

2016-08-03 Thread Matt Roper
se needs braces, you need to put them on both branches). > + if (result == 1) As I mentioned before, the 1=off looks confusing if someone isn't looking at the bspec carefully. Using a #define for the various 0x1's in this patch might help clarify the code slightly. With

[PATCH v5 3/6] drm/i915/skl: Update plane watermarks atomically during plane updates

2016-08-03 Thread Matt Roper
On Tue, Aug 02, 2016 at 02:20:33PM -0700, Matt Roper wrote: > On Tue, Aug 02, 2016 at 02:52:51PM -0400, Lyude wrote: > > Thanks to Ville for suggesting this as a potential solution to pipe > > underruns on Skylake. > > > > On Skylake all of the registers for co

[PATCH v5 3/6] drm/i915/skl: Update plane watermarks atomically during plane updates

2016-08-03 Thread Matt Roper
On Wed, Aug 03, 2016 at 02:14:53PM -0700, Matt Roper wrote: ... > > I imagine we'll eventually probably want to create a new display vfunc > to handle platform-specific pipe-level stuff that needs to happen under > vblank evasion (like the scalers and linetime WM we have today) to kee

[PATCH v6 6/6] drm/i915/skl: Update DDB values atomically with wms/plane attrs

2016-08-03 Thread Matt Roper
0e8fb7ba7ca5 ("drm/i915/skl: Flush the WM configuration") > > Fixes: 8211bd5bdf5e ("drm/i915/skl: Program the DDB allocation") > > Signed-off-by: Lyude > > [omitting CC for stable, since this patch will need to be changed for > >

[Intel-gfx] [PATCH v4 0/6] Finally fix watermarks

2016-07-29 Thread Matt Roper
On Fri, Jul 29, 2016 at 12:39:05PM +0300, Ville Syrjälä wrote: > On Thu, Jul 28, 2016 at 05:03:52PM -0700, Matt Roper wrote: > > This is completely untested (and probably horribly broken/buggy), but > > here's a quick mockup of the general approach I was thinking for > > en

[Intel-gfx] [PATCH v4 0/6] Finally fix watermarks

2016-07-29 Thread Matt Roper
> we've got enough workarounds to make this tolerable. I've shown this to > > matt roper, but I should probably post what I've been trying to do for > > you as well. > > > > So the approach I came up with is here > > > > https://github.com/lyude/linux/tree/wip/s

[PATCH] drm/i915/skl: Add support for the SAGV, fix underrun hangs

2016-07-12 Thread Matt Roper
.." which I believe indicates that this isn't relevant to the Atom processors like Broxton. The SAGV block time table also lists "SKL, EXCLUDE(BXT)." This would also explain why I've been unable to reproduce your SKL problems on my Broxton hardware. Matt > for_each_i

[PATCH v3] drm/i915/skl: Add support for the SAGV, fix underrun hangs

2016-07-12 Thread Matt Roper
gt; - Added comments about this probably being one of the requirements to >fixing Skylake's watermark issues > - Minor style nitpicks from Matt Roper > - Disable these functions on Broxton, since it doesn't have an SAGV > > Cc: Matt Roper > Cc: Daniel Vetter > Cc: Ville Syrj

[Intel-gfx] [PATCH v3] drm/i915/skl: Add support for the SAGV, fix underrun hangs

2016-07-13 Thread Matt Roper
On Tue, Jul 12, 2016 at 11:21:39AM -0700, Matt Roper wrote: > On Tue, Jul 12, 2016 at 01:36:03PM -0400, Lyude wrote: > > Since the watermark calculations for Skylake are still broken, we're apt > > to hitting underruns very easily under multi-monitor configurations. > > Whi

[Intel-gfx] [PATCH v3] drm/i915/skl: Add support for the SAGV, fix underrun hangs

2016-07-13 Thread Matt Roper
On Wed, Jul 13, 2016 at 09:12:09PM +0300, Ville Syrjälä wrote: > On Wed, Jul 13, 2016 at 11:08:46AM -0700, Matt Roper wrote: > > On Tue, Jul 12, 2016 at 11:21:39AM -0700, Matt Roper wrote: > > > On Tue, Jul 12, 2016 at 01:36:03PM -0400, Lyude wrote: > > > > Si

[PATCH 1/2] drm/i915/skl: Update plane watermarks atomically during plane updates

2016-07-19 Thread Matt Roper
n to fixing all of the > underrun issues we're currently seeing with skl > > Signed-off-by: Lyude Paul > Cc: stable at vger.kernel.org > Cc: Ville Syrjälä > Cc: Daniel Vetter > Cc: Radhakrishna Sripada > Cc: Hans de Goede > Cc: Matt Roper > --- >

[PATCH 2/2] drm/i915/skl: Don't mark pipes as dirty unless we've added/removed pipes

2016-07-19 Thread Matt Roper
ude Paul > Cc: stable at vger.kernel.org > Cc: Ville Syrjälä > Cc: Daniel Vetter > Cc: Radhakrishna Sripada > Cc: Hans de Goede > Cc: Matt Roper > --- > drivers/gpu/drm/i915/intel_pm.c | 16 +++- > 1 file changed, 11 insertions(+), 5 deletions(-) >

[PATCH 1/6] drm/i915/skl: Update plane watermarks atomically during plane updates

2016-07-20 Thread Matt Roper
oop in skl_write_plane_wm (level < max_level > should be level <= max_level) > - Make diagram in commit more accurate to what's actually happening > - Add Fixes: > > Fixes: 2d41c0b59afc ("drm/i915/skl: SKL Watermark Computation") > Signed-off-by: Lyude > Cc: stab

[PATCH 2/6] drm/i915/gen9: Only copy WM results for changed pipes to skl_hw

2016-07-20 Thread Matt Roper
On Wed, Jul 20, 2016 at 04:59:58PM -0400, Lyude wrote: > From: Matt Roper > > When we write watermark values to the hardware, those values are stored > in dev_priv->wm.skl_hw. However with recent watermark changes, the > results structure we're copying from only contai

[PATCH 3/6] drm/i915/skl: Actually reuse wm values when pipes don't change

2016-07-20 Thread Matt Roper
not worry about copying over the unchanged values. Matt > > Fixes: 734fa01f3a17 ("drm/i915/gen9: Calculate watermarks during atomic > 'check' (v2)") > Cc: stable at vger.kernel.org > Cc: Ville Syrjälä > Cc: Daniel Vetter > Cc: Radhakrishna Sripada > Cc: Han

[PATCH 4/6] drm/i915/skl: Always wait for pipes to update after a flush

2016-07-20 Thread Matt Roper
pletely overlooking some stumbling block that makes it much more complicated than I'm envisioning. Matt > > Fixes: 0e8fb7ba7ca5 ("drm/i915/skl: Flush the WM configuration") > Signed-off-by: Lyude > Cc: stable at vger.kernel.org > Cc: Ville Syrjälä > Cc: Daniel Vetter

[PATCH v2 2/4] drm/i915/skl: Only flush pipes when we change the ddb allocation

2016-07-21 Thread Matt Roper
skl_allocate_pipe_ddb(cstate, new_ddb); > if (ret) > return ret; > + > + if (!intel_state->wm_results.ddb_changed && > + skl_pipe_ddb_changed(old_ddb, new_ddb, intel_crtc->pipe)) > + intel_state->wm_results.ddb_changed = true; > } > > return 0; > -- > 2.7.4 > -- Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795

[PATCH v2 4/4] drm/i915/skl: Update plane watermarks atomically during plane updates

2016-07-21 Thread Matt Roper
N9() instead of IS_SKYLAKE() since these fixes apply to more >then just Skylake > - Update description to make it clear this patch doesn't fix everything > - Check if pipes were actually changed before writing watermarks > > Fixes: 2d41c0b59afc ("drm/i915/skl: SKL

[PATCH v4 1/6] drm/i915/skl: Add support for the SAGV, fix underrun hangs

2016-07-28 Thread Matt Roper
minor style nitpicks to patch this time > Changes since v1: > - Added comments about this probably being one of the requirements to >fixing Skylake's watermark issues > - Minor style nitpicks from Matt Roper > - Disable these functions on Broxton, since it doesn't have an SAGV

[PATCH v4 5/6] drm/i915/skl: Update plane watermarks atomically during plane updates

2016-07-28 Thread Matt Roper
vblank evasion > > Changes since v3: > - Rebase against new SAGV patch changes > > Fixes: 2d41c0b59afc ("drm/i915/skl: SKL Watermark Computation") > Signed-off-by: Lyude > Cc: stable at vger.kernel.org > Cc: Ville Syrjälä > Cc: Daniel Vetter > Cc: Ra

[PATCH v4 3/6] drm/i915/skl: Only flush pipes when we change the ddb allocation

2016-07-28 Thread Matt Roper
tate); > > - ret = skl_allocate_pipe_ddb(cstate, ddb); > + ret = skl_allocate_pipe_ddb(cstate, new_ddb); > if (ret) > return ret; > + > + if (!intel_state->wm_results.ddb_changed && I think you c

[Intel-gfx] [PATCH v4 0/6] Finally fix watermarks

2016-07-28 Thread Matt Roper
mically during plane updates > drm/i915/skl: Always wait for pipes to update after a flush > > Matt Roper (1): > drm/i915/gen9: Only copy WM results for changed pipes to skl_hw > > drivers/gpu/drm/i915/i915_drv.h | 3 + > drivers/gpu/drm/i915/i915_reg.h |

[PATCH 2/6] drm: introduce color correction properties

2016-02-17 Thread Matt Roper
the blob has an invalid size) so that it will be more apparent why we failed when looking at kernel logs. * Looks like one minor whitespace error, noted below. * One minor helper note below. Aside from those, Reviewed-by: Matt Roper Also, somewhere (probably as a followup patch to this

[Intel-gfx] [PATCH 3/6] drm/i915: enable CSC for pipe C

2016-02-17 Thread Matt Roper
IPE_A_CSC_POSTOFF_ME, _PIPE_B_CSC_POSTOFF_ME, _PIPE_C_CSC_POSTOFF_ME) > +#define PIPE_CSC_POSTOFF_LO(pipe)_MMIO_PIPE3(pipe, > _PIPE_A_CSC_POSTOFF_LO, _PIPE_B_CSC_POSTOFF_LO, _PIPE_C_CSC_POSTOFF_LO) > > /* MIPI DSI registers */ > > -- > 2.7.0 > > ___ > Intel-gfx mailing list > Intel-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795

[Intel-gfx] [PATCH 5/6] drm/i915: Implement color management on bdw/skl/bxt/kbl

2016-02-18 Thread Matt Roper
intel_color_load_gamma_lut, > + .load_lut = intel_color_legacy_load_lut, > .atomic_begin = intel_begin_crtc_commit, > .atomic_flush = intel_finish_crtc_commit, > .atomic_check = intel_crtc_atomic_check, > @@ -13428,6 +13428,17 @@ static int intel_atomic_commit(struct drm_device > *dev, > hw_check = true; > } > > + if (!modeset && > + crtc->state->active && > + crtc->state->color_mgmt_changed) { > + /* Only update color management when not doing Minor nitpick; kernel coding style says the opening "/*" of multi-line comments should be on a line by itself. > + * a modeset as this will be done by > + * crtc_enable already. > + */ > + intel_color_set_csc(crtc); > + intel_color_load_luts(crtc); > + } > + > if (!modeset) > intel_pre_plane_update(to_intel_crtc_state(crtc_state)); > > @@ -13519,6 +13530,7 @@ out: > static const struct drm_crtc_funcs intel_crtc_funcs = { > .gamma_set = intel_color_legacy_gamma_set, > .set_config = drm_atomic_helper_set_config, > + .set_property = drm_atomic_helper_crtc_set_property, > .destroy = intel_crtc_destroy, > .page_flip = intel_crtc_page_flip, > .atomic_duplicate_state = intel_crtc_duplicate_state, > diff --git a/drivers/gpu/drm/i915/intel_drv.h > b/drivers/gpu/drm/i915/intel_drv.h > index 2b5d03a..c384c78 100644 > --- a/drivers/gpu/drm/i915/intel_drv.h > +++ b/drivers/gpu/drm/i915/intel_drv.h > @@ -507,6 +507,8 @@ struct intel_crtc_state { > /* IVB sprite scaling w/a (WaCxSRDisabledForSpriteScaling:ivb) */ > bool disable_lp_wm; > > + uint32_t gamma_mode; > + > struct { > /* >* optimal watermarks, programmed post-vblank when this state > @@ -1620,9 +1622,11 @@ extern const struct drm_plane_helper_funcs > intel_plane_helper_funcs; > > /* intel_color.c */ > void intel_color_init(struct drm_crtc *crtc); > +void intel_color_update(struct drm_crtc *crtc); > void intel_color_set_csc(struct drm_crtc *crtc); > -void intel_color_load_gamma_lut(struct drm_crtc *crtc); > +void intel_color_load_luts(struct drm_crtc *crtc); > void intel_color_legacy_gamma_set(struct drm_crtc *crtc, u16 *red, u16 > *green, > u16 *blue, uint32_t start, uint32_t size); > +void intel_color_legacy_load_lut(struct drm_crtc *crtc); intel_color_load_gamma_lut() was a rename from patch #1 of the series. Maybe we should squash this name change back into that patch, even though we only have a single LUT at that point? I guess it doesn't really matter too much either way. Matt > > #endif /* __INTEL_DRV_H__ */ > -- > 2.7.0 > > ___ > Intel-gfx mailing list > Intel-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795

[PATCH 1/5] drm/i915: Extract out gamma table and CSC to their own file

2016-02-22 Thread Matt Roper
iew which is recognized > as a gen 8 but doesn't have the same enhanced color correction unit > from Haswell on. > > v2: Fix access to GAMMA_MODE register on older generations than > Haswell (from Matt Roper's comments) > > Signed-off-by: Lionel Landwerlin Reviewe

[Intel-gfx] [PATCH 2/5] drm/i915: Do not read GAMMA_MODE register

2016-02-22 Thread Matt Roper
517,6 +517,9 @@ struct intel_crtc_state { > struct skl_pipe_wm skl; > } optimal; > } wm; > + > + /* Gamma mode programmed on the pipe */ > + uint32_t gamma_mode; > }; > > struct vlv_wm_state { > -- > 2.7.0 > > ___

[PATCH 4/5] drm/i915: Implement color management on bdw/skl/bxt/kbl

2016-02-22 Thread Matt Roper
* Only update color management when not doing > + * a modeset as this will be done by > + * crtc_enable already. > + */ > + intel_color_set_csc(crtc); > + intel_color_load_luts(crtc); > + } > + > if (!modeset) > intel_pre_plane_update(to_intel_crtc_state(crtc_state)); > > @@ -13487,8 +13504,9 @@ out: > #undef for_each_intel_crtc_masked > > static const struct drm_crtc_funcs intel_crtc_funcs = { > - .gamma_set = intel_color_legacy_gamma_set, > + .gamma_set = drm_atomic_helper_legacy_gamma_set, > .set_config = drm_atomic_helper_set_config, > + .set_property = drm_atomic_helper_crtc_set_property, > .destroy = intel_crtc_destroy, > .page_flip = intel_crtc_page_flip, > .atomic_duplicate_state = intel_crtc_duplicate_state, > diff --git a/drivers/gpu/drm/i915/intel_drv.h > b/drivers/gpu/drm/i915/intel_drv.h > index 9742d5b..3082dbe 100644 > --- a/drivers/gpu/drm/i915/intel_drv.h > +++ b/drivers/gpu/drm/i915/intel_drv.h > @@ -1624,9 +1624,8 @@ extern const struct drm_plane_helper_funcs > intel_plane_helper_funcs; > > /* intel_color.c */ > void intel_color_init(struct drm_crtc *crtc); > +int intel_color_check(struct drm_crtc *crtc, struct drm_crtc_state *state); > void intel_color_set_csc(struct drm_crtc *crtc); > void intel_color_load_luts(struct drm_crtc *crtc); > -void intel_color_legacy_gamma_set(struct drm_crtc *crtc, u16 *red, u16 > *green, > - u16 *blue, uint32_t start, uint32_t size); > > #endif /* __INTEL_DRV_H__ */ > diff --git a/drivers/gpu/drm/i915/intel_fbdev.c > b/drivers/gpu/drm/i915/intel_fbdev.c > index 97a91e6..777f98c 100644 > --- a/drivers/gpu/drm/i915/intel_fbdev.c > +++ b/drivers/gpu/drm/i915/intel_fbdev.c > @@ -379,6 +379,7 @@ retry: > struct drm_connector *connector; > struct drm_encoder *encoder; > struct drm_fb_helper_crtc *new_crtc; > + struct intel_crtc *intel_crtc; > > fb_conn = fb_helper->connector_info[i]; > connector = fb_conn->connector; > @@ -420,6 +421,13 @@ retry: > > num_connectors_enabled++; > > + intel_crtc = to_intel_crtc(connector->state->crtc); > + for (j = 0; j < 256; j++) { > + intel_crtc->lut_r[j] = j; > + intel_crtc->lut_g[j] = j; > + intel_crtc->lut_b[j] = j; > + } > + > new_crtc = intel_fb_helper_crtc(fb_helper, > connector->state->crtc); > > /* > -- > 2.7.0 > > ___ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795

[Intel-gfx] [PATCH 2/5] drm/i915: Do not read GAMMA_MODE register

2016-02-23 Thread Matt Roper
On Tue, Feb 23, 2016 at 10:36:36AM +, Lionel Landwerlin wrote: > On 23/02/16 00:38, Matt Roper wrote: > >On Mon, Feb 22, 2016 at 02:18:08PM +, Lionel Landwerlin wrote: > >>Implement Daniel Stone's recommendation to not read registers to infer > >>the hardware's

[PATCH 2/5] drm/i915: Do not read GAMMA_MODE register

2016-02-25 Thread Matt Roper
dex acbb1d9..19f8284 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -9891,6 +9891,8 @@ static bool haswell_get_pipe_config(struct intel_crtc > *crtc, > > intel_get_pipe_timings(crtc, pipe_config); > > + pi

[Intel-gfx] [PATCH 4/5] drm/i915: Implement color management on bdw/skl/bxt/kbl

2016-02-25 Thread Matt Roper
s of this patch. It's a pretty large/complicated patch overall, so there may be things I missed, but I think it's in good enough shape to merge. Acknowledged-by: Matt Roper > --- > Documentation/DocBook/gpu.tmpl | 6 +- > drivers/gpu/drm/i915/i915_drv.c | 24 ++- >

[PATCH 5/5] drm/i915: Implement color management on chv

2016-02-25 Thread Matt Roper
ashank Sharma > Signed-off-by: Lionel Landwerlin > Signed-off-by: Kumar, Kiran S > Signed-off-by: Kausal Malladi Reviewed-by: Matt Roper > --- > drivers/gpu/drm/i915/i915_drv.c| 3 + > drivers/gpu/drm/i915/i915_reg.h| 31

[Intel-gfx] [PATCH 3/5] drm: introduce pipe color correction properties

2016-02-25 Thread Matt Roper
on't have a strong feeling either way, but we should probably just make sure everyone is on the same page. If we decide as a community that we *do* want the atomic requirement going forward, maybe we can add a note about that to the kerneldoc or something so we remember in the future. Matt -- Matt Ro

[PATCH] drm: Store the plane's index

2016-05-26 Thread Matt Roper
construction and then only walking the tail upon removal should > be a major improvement for all. > > v2: Convert drm_crtc_index() and drm_encoder_index() as well. > > Signed-off-by: Chris Wilson > Cc: Daniel Vetter > Cc: Matt Roper > Cc: Ville Syrjälä Looks good to me.

[PATCH v3] drm: Store the plane's index

2016-05-27 Thread Matt Roper
king > provided to allow for dynamic removal of planes/encoders/crtcs. > > v2: Convert drm_crtc_index() and drm_encoder_index() as well. > v3: Stop adjusting the indices upon removal; consider the list > construct-only. > > Signed-off-by: Chris Wilson > Cc: Daniel Vetter > C

[PATCH v2 1/2] drm: Add infrastructure for CRTC background color property (v2)

2016-02-10 Thread Matt Roper
create the background color property. (Bob) - Add helper to build 64-bit RGBA internal value in appropriate format (e.g., for the initial value when attaching a property). (Bob) Cc: dri-devel at lists.freedesktop.org Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_atomic.c | 4 ++ drivers/g

[PATCH v2 2/2] drm/i915/gen9: Add support for pipe background color (v2)

2016-02-10 Thread Matt Roper
Paauwe Cc: dri-devel at lists.freedesktop.org Signed-off-by: Matt Roper --- Documentation/DocBook/gpu.tmpl | 10 +++- drivers/gpu/drm/i915/i915_debugfs.c | 8 +++ drivers/gpu/drm/i915/i915_reg.h | 9 +++ drivers/gpu/drm/i915/intel_display.c | 46

[PATCH v2 2/2] drm/i915/gen9: Add support for pipe background color (v2)

2016-02-11 Thread Matt Roper
On Thu, Feb 11, 2016 at 12:00:50PM +0200, Ville Syrjälä wrote: > On Wed, Feb 10, 2016 at 06:32:59PM -0800, Matt Roper wrote: > > Gen9 platforms allow CRTC's to be programmed with a background/canvas > > color below the programmable planes. Let's expose this as a property to >

[PATCH v2 2/2] drm/i915/gen9: Add support for pipe background color (v2)

2016-03-03 Thread Matt Roper
On Thu, Mar 03, 2016 at 03:50:23PM +, Lionel Landwerlin wrote: > Hi Matt, > > On 11/02/16 02:32, Matt Roper wrote: > >Gen9 platforms allow CRTC's to be programmed with a background/canvas > >color below the programmable planes. Let's expose this as a property to > >

[PATCH 1/4] drm: Really never disable vblank irqs for offdelay==0

2014-09-10 Thread Matt Roper
for > debugging, so restore that behaviour. > > Suggested-by: Mario Kleiner > Cc: Mario Kleiner > Cc: Matt Roper > Cc: Ville Syrj?l? > Signed-off-by: Daniel Vetter Reviewed-by: Matt Roper > --- > drivers/gpu/drm/drm_irq.c | 6 -- > 1 file changed, 4

[PATCH 2/4] drm: Only update final vblank count when precise ts is available

2014-09-11 Thread Matt Roper
r. > > Suggested-by: Mario Kleiner > Cc: Mario Kleiner > Cc: Matt Roper > Cc: Ville Syrj?l? > Signed-off-by: Daniel Vetter Reviewed-by: Matt Roper > --- > drivers/gpu/drm/drm_irq.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff -

[PATCH] drm: Add integer overflow checking to transitional plane helpers

2015-04-03 Thread Matt Roper
lla: https://bugs.freedesktop.org/show_bug.cgi?id=84269 Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_plane_helper.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index 33807e0..1e9e105 100644 --- a/drive

[PATCH] drm: Make integer overflow checking cover universal cursor updates (v2)

2015-04-13 Thread Matt Roper
tcase: igt/kms_cursor_crc Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84269 Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c ind

[RFCv2 06/10] drm: Specify primary plane at CRTC initialization

2014-03-10 Thread Matt Roper
On Sun, Mar 09, 2014 at 05:12:31PM -0400, Rob Clark wrote: > On Fri, Mar 7, 2014 at 7:03 PM, Matt Roper > wrote: > > Add primary plane as a parameter to drm_crtc_init() and update all > > existing DRM drivers to use a helper-provided primary plane. > > >

[RFCv2 05/10] drm: Add plane type property

2014-03-12 Thread Matt Roper
On Tue, Mar 11, 2014 at 04:45:00PM -0700, Bob Paauwe wrote: > On Fri, 7 Mar 2014 16:03:17 -0800 > Matt Roper wrote: ... > > +static int drm_mode_create_standard_plane_properties(struct drm_device > > *dev) > > +{ > > + struct drm_property *type; > > + >

[RFCv3 04/14] drm/exynos: Restrict plane loops to only operate on overlay planes

2014-03-18 Thread Matt Roper
Before we add additional types of planes to the DRM plane list, ensure that existing loops over all planes continue to operate only on "overlay" planes and ignore primary & cursor planes. Cc: Inki Dae Signed-off-by: Matt Roper --- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 6

[RFCv3 01/14] SQUASH! drm/i915: Do not dereference pointers from ring buffer in evict event

2014-03-18 Thread Matt Roper
Build fix for drm-intel-nightly: there is no 'dev' variable for TP_fast_assign(); should be vm->dev. Cc: intel-gfx at lists.freedesktop.org Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/i915_trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i

[RFCv3 05/14] drm/i915: Restrict plane loops to only operate on overlay planes

2014-03-18 Thread Matt Roper
Before we add additional types of planes to the DRM plane list, ensure that existing loops over all planes continue to operate only on "overlay" planes and ignore primary & cursor planes. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel

[RFCv3 06/14] drm: Add plane type property

2014-03-18 Thread Matt Roper
Add a plane type property to allow userspace to distinguish plane types. The type of the plane will now be established at drm_plane_init() time (replacing the 'priv' parameter previously used). Signed-off-by: Matt Roper --- drivers/gpu/drm/armada/armada_overlay.c| 3 +- drivers/gpu/drm

[RFCv3 10/14] drm/i915: Rename similar plane functions to avoid confusion

2014-03-18 Thread Matt Roper
intel_disable_primary_plane() to intel_disable_primary_hw_plane() to make the two names a little more distinct. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/i915_drv.h | 5 +-- drivers/gpu/drm/i915/intel_display.c | 60 2 files

[RFCv3 07/14] drm: Specify primary plane at CRTC initialization (v2)

2014-03-18 Thread Matt Roper
Add primary plane as a parameter to drm_crtc_init() and update all existing DRM drivers to use a helper-provided primary plane. v2: Update msm & omap drivers to use existing "private" planes as primary planes instead of helper [Rob Clark] Tested-by: Rob Clark Signed-off-

[RFCv3 09/14] drm: Allow userspace to ask for full plane list (universal planes)

2014-03-18 Thread Matt Roper
Userspace clients which wish to receive all DRM planes (primary and cursor planes in addition to the traditional overlay planes) may set the DRM_CLIENT_CAP_UNIVERSAL_PLANES capability. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 20 +++- drivers/gpu/drm

[RFCv3 12/14] drm: Specify cursor plane at CRTC initialization

2014-03-18 Thread Matt Roper
-by: Matt Roper --- drivers/gpu/drm/armada/armada_crtc.c | 2 +- drivers/gpu/drm/ast/ast_mode.c | 2 +- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- drivers/gpu/drm/cirrus/cirrus_mode.c | 3 ++- drivers/gpu/drm/drm_crtc.c | 6 ++ drivers/gpu/drm/exynos

[RFCv3 11/14] drm/i915: Intel-specific primary plane handling

2014-03-18 Thread Matt Roper
Intel hardware allows the primary plane to be disabled independently of the CRTC. Provide custom primary plane handling to allow this. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 132 ++- drivers/gpu/drm

[RFCv3 14/14] drm/i915: Add cursor handlers and create cursor at crtc init

2014-03-18 Thread Matt Roper
Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 90 +++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f661469

[RFCv3 13/14] drm/i915: Split cursor update code from cursor ioctl handling

2014-03-18 Thread Matt Roper
common code between both interfaces. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 197 --- drivers/gpu/drm/i915/intel_drv.h | 2 - 2 files changed, 134 insertions(+), 65 deletions(-) diff --git a/drivers

[RFCv3 00/14] Unified plane support

2014-03-18 Thread Matt Roper
l-nightly branch of the drm-intel repo. Matt Roper (14): SQUASH! drm/i915: Do not dereference pointers from ring buffer in evict event drm: Add support for multiple plane types drm: Add primary plane helpers drm/exynos: Restrict plane loops to only operate on overlay planes drm/i915: R

[RFCv3 03/14] drm: Add primary plane helpers

2014-03-18 Thread Matt Roper
more efficiently, that want to use their own primary plane structure to track additional information, or that don't have the limitations assumed by the helpers are free to provide their own implementation of some or all of these handlers. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c

[RFCv3 02/14] drm: Add support for multiple plane types

2014-03-18 Thread Matt Roper
The DRM core currently only tracks "overlay"-style planes. Start refactoring the plane handling to allow other plane types (primary and cursor) to also be placed on the DRM plane list. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 21 - drive

[RFCv3 08/14] drm: Replace crtc fb with primary plane fb (v2)

2014-03-18 Thread Matt Roper
the framebuffer since the existing loop over all planes will take care of disabling the primary plane (and on most hardware, the CRTC by extension). v2: Fixup several lingering crtc->fb instances that were missed in the first patch iteration. Tested-by: Rob Clark Signed-off-by: Matt Ro

[RFCv3 03/14] drm: Add primary plane helpers

2014-03-19 Thread Matt Roper
On Wed, Mar 19, 2014 at 12:28:43PM +0100, Daniel Vetter wrote: > On Tue, Mar 18, 2014 at 05:22:48PM -0700, Matt Roper wrote: ... > > + > > + /* > > +* set_config() adjusts crtc->primary->fb; however the DRM setplane > > +* code that called us expects

[RFCv3 03/14] drm: Add primary plane helpers

2014-03-19 Thread Matt Roper
On Wed, Mar 19, 2014 at 01:24:23PM +0100, Daniel Vetter wrote: > On Tue, Mar 18, 2014 at 05:22:48PM -0700, Matt Roper wrote: > > When we expose non-overlay planes to userspace, they will become > > accessible via standard userspace plane API's. We should be able to > > hand

[RFCv3 08/14] drm: Replace crtc fb with primary plane fb (v2)

2014-03-24 Thread Matt Roper
On Wed, Mar 19, 2014 at 12:57:21PM +0100, Daniel Vetter wrote: > On Tue, Mar 18, 2014 at 05:22:53PM -0700, Matt Roper wrote: > > Now that CRTC's have a primary plane, there's no need to track the > > framebuffer in the CRTC. Replace all references to the CRTC fb > > with t

[PATCHv4 02/13] drm/exynos: Restrict plane loops to only operate on overlay planes (v2)

2014-03-27 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. v2: Switch to using drm_for_each_legacy_plane() Cc: Inki Dae Signed-off-by: Matt Roper --- drivers/gpu/drm/exynos

[PATCHv4 03/13] drm/i915: Restrict plane loops to only operate on overlay planes (v2)

2014-03-27 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. v2: Switch to using drm_for_each_legacy_plane() Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers

[PATCHv4 07/13] drm: Add drm_universal_plane_init()

2014-03-27 Thread Matt Roper
is_primary' under the assumption that all existing uses of private planes were representing primary planes. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 84 ++ include/drm/drm_crtc.h | 9 - 2 files changed, 63 insertions(+), 30 deletions

[PATCHv4 09/13] drm: Add plane max width/height properties

2014-03-27 Thread Matt Roper
planes and mode_config.cursor_{width,height} are used for cursors; drivers should override these defaults after calling plane_init, if necessary. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 30 ++ include/drm/drm_crtc.h | 2 ++ 2 files changed, 32

[PATCHv4 08/13] drm: Add plane type property (v2)

2014-03-27 Thread Matt Roper
Add a plane type property to allow userspace to distinguish plane types. v2: Driver-specific churn eliminated now that drm_plane_init() and drm_universal_plane_init() were separated out in a previous patch. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 23

[PATCHv4 10/13] drm: Add drm_crtc_init_with_planes()

2014-03-27 Thread Matt Roper
and no cursor plane. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 44 +--- include/drm/drm_crtc.h | 11 +++ 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 24226de

[PATCHv4 06/13] drm: Add primary plane helpers (v2)

2014-03-27 Thread Matt Roper
/drivers. Drivers may call this function with a more accurate plane list to enable additional formats they can support. Signed-off-by: Matt Roper --- drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_plane_helper.c | 312 + include/drm

[PATCHv4 00/13] Universal plane preparation patches

2014-03-27 Thread Matt Roper
reedesktop.org/archives/dri-devel/2014-March/055222.html [3] http://lists.freedesktop.org/archives/dri-devel/2014-February/054719.html [4] http://lists.freedesktop.org/archives/dri-devel/2014-March/055216.html Matt Roper (13): drm: Add support for multiple plane types (v2) drm/exynos: Restr

[PATCHv4 05/13] drm: Make drm_crtc_check_viewport non-static

2014-03-27 Thread Matt Roper
This function will be used by the universal plane helpers and may also be useful for individual drivers. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 20 +--- include/drm/drm_crtc.h | 4 2 files changed, 17 insertions(+), 7 deletions(-) diff --git

[PATCHv4 01/13] drm: Add support for multiple plane types (v2)

2014-03-27 Thread Matt Roper
Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 21 - drivers/gpu/drm/drm_fb_helper.c | 3 ++- include/drm/drm_crtc.h | 24 +++- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drive

[PATCHv4 04/13] drm/shmobile: Restrict plane loops to only operate on legacy planes

2014-03-27 Thread Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. Cc: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com> Signed-off-by: Matt Roper --- drivers/g

[PATCHv4 12/13] drm: Replace crtc fb with primary plane fb (v3)

2014-03-27 Thread Matt Roper
s that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper --- This patch will cause some heartache for tree maintainers since it's pretty much a point of no return and touches so many drivers. There's been some discussion on the mailing list about how this might be split

[PATCHv4 11/13] drm/msm: Switch to universal plane API's

2014-03-27 Thread Matt Roper
Use drm_universal_plane_init() and drm_crtc_init_with_planes() rather than the legacy drm_plane_init() / drm_crtc_init(). This will ensure that the proper primary plane is registered with the DRM (and eventually exposed to userspace in future patches). Cc: Rob Clark Signed-off-by: Matt Roper

[PATCHv4 13/13] drm: Remove unused drm_crtc->fb

2014-03-27 Thread Matt Roper
Signed-off-by: Matt Roper --- include/drm/drm_crtc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index e7ed766..282f823 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -311,9 +311,6 @@ struct drm_crtc { struct

[PATCHv4 06/13] drm: Add primary plane helpers (v2)

2014-03-31 Thread Matt Roper
On Fri, Mar 28, 2014 at 09:32:06AM +0100, Daniel Vetter wrote: > On Thu, Mar 27, 2014 at 05:44:31PM -0700, Matt Roper wrote: ... > > +* N.B., we call set_config() directly here rather than using > > +* drm_mode_set_config_internal. We're reprogramming the same > &

[PATCH] drm/plane: Fix sparse warnings

2014-05-13 Thread Matt Roper
mary_helper_create_plane' was here >struct drm_plane *drm_primary_helper_create_plane(struct drm_device > *dev, > ^ > > Which can easily be fixed by making the signatures of the implementation > and the prototype match. > > Signed-off-by: Thi

[PATCH] drm/plane: Fix a couple of checkpatch warnings

2014-05-13 Thread Matt Roper
tart of a line > #42: FILE: drivers/gpu/drm/drm_plane_helper.c:42: > + DRM_FORMAT_ARGB,$ > > Signed-off-by: Thierry Reding Reviewed-by: Matt Roper > --- > drivers/gpu/drm/drm_plane_helper.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

[RFC 0/4] Cursor support with universal planes

2014-05-15 Thread Matt Roper
nformation can be also be derived from crtc->cursor->fb. Matt Roper (4): drm: Support legacy cursor ioctls via universal planes when possible drm: Allow drivers to register cursor planes with crtc drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer drm/i915: Switch to unif

[RFC 4/4] drm/i915: Switch to unified plane cursor handling

2014-05-15 Thread Matt Roper
was called. The aim here is to transition to the universal plane interface with minimal code change. There's a lot of cleanup that can be done (e.g., using state stored in crtc->cursor->fb rather than intel_crtc) that is left to future patches. Signed-off-by: Matt Roper --- drivers/gpu/dr

[RFC 2/4] drm: Allow drivers to register cursor planes with crtc

2014-05-15 Thread Matt Roper
Universal plane support had placeholders for cursor planes, but didn't actually do anything with them. Save the cursor plane reference inside the crtc and update the cursor plane parameter from void* to drm_plane. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 5 - include/drm

[RFC 3/4] drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer

2014-05-15 Thread Matt Roper
this new function. This refactoring is in preparation for the universal plane cursor support where we'll want to update the cursor with an actual GEM buffer object (obtained via drm_framebuffer) rather than a userspace handle. Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c

[RFC 1/4] drm: Support legacy cursor ioctls via universal planes when possible

2014-05-15 Thread Matt Roper
and universal cursor calls. With this patch, a driver that switches to universal cursor support may assume that all cursor buffers are wrapped in a drm_framebuffer and can rely on framebuffer reference counting for all cursor operations. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 108

[Intel-gfx] [PATCH 2/4] drm/plane-helper: Add drm_primary_helper_check_update() (v2)

2014-05-16 Thread Matt Roper
when running on Cherrytrail and then program the hardware accordingly, but that's really an extra feature beyond what I'm adding here; we'd want to add that as a follow-on patch later and come up with a whole extra set of tests to exercise it. I'd rather focus on getting this general i915 su

[PATCH 1/2] drm: Refactor framebuffer creation to allow internal use

2014-05-16 Thread Matt Roper
handler. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 64 +++--- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index b6d6c04..1a1a5f4 100644 --- a/drivers/gpu/drm

[PATCH 2/2] drm: Refactor setplane to allow internal use

2014-05-16 Thread Matt Roper
Refactor DRM setplane code into a new setplane_internal() function that takes DRM objects directly as parameters rather than looking them up by ID. We'll use this in a future patch when we implement legacy cursor ioctls on top of the universal plane interface. Signed-off-by: Matt Roper

[PATCH 1/4] drm: Support legacy cursor ioctls via universal planes when possible (v2)

2014-05-16 Thread Matt Roper
reference will be taken here. - Grab extra reference to fb under lock in !BO case to avoid issues where racing userspace could cause the fb to be destroyed out from under us after we grab the fb pointer. Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 108

[PATCH 3/4] drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer (v2)

2014-05-16 Thread Matt Roper
reference consumption Reviewed-by: Daniel Vetter Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 42 ++-- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915

[PATCH 2/4] drm/plane-helper: Add drm_plane_helper_check_update() (v3)

2014-05-19 Thread Matt Roper
between helper and drivers (suggested by Ville). - Allow caller to specify whether the primary plane should be updatable while the crtc is disabled. Cc: Ville Syrj?l? Cc: dri-devel at lists.freedesktop.org Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_plane_helper.c | 124

[Intel-gfx] [PATCH 1/4] drm: Support legacy cursor ioctls via universal planes when possible (v2)

2014-05-19 Thread Matt Roper
On Sat, May 17, 2014 at 12:43:04AM +0200, Daniel Vetter wrote: > On Sat, May 17, 2014 at 12:38 AM, Matt Roper > wrote: > > + if (ret) { > > + if (req->flags & DRM_MODE_CURSOR_BO) > > + drm_mode_rmfb(dev, >base.id, file

[PATCH 1/6] drm: Refactor framebuffer creation to allow internal use (v2)

2014-05-19 Thread Matt Roper
handler. v2: Take struct drm_mode_fb_cmd2 parameter directly rather than void* Reviewed-by: Daniel Vetter Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_crtc.c | 69 -- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm

  1   2   3   4   5   6   7   8   9   10   >