[Intel-gfx] [PATCH v3] drm/i915: Implement dma-buf mmap() for userspace access

2014-06-19 Thread Ander Conselvan de Oliveira
-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c index 580aa42

[Intel-gfx] [PATCH 0/4] [RFC] Stage shared dpll configs

2014-10-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Hi, This series changes the mode set sequence so that the clock and PLL logic that was done in the *_crtc_mode_set() hooks is done before disabling crtcs. This avoids having to restore the old configuration in the case

[Intel-gfx] [PATCH 4/4] drm/i915: Compute clocks and choose DPLLs before disabling crtcs

2014-10-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com It is possible for a mode set to fail if there aren't shared DPLLS that match the new configuration requirement or other errors in clock computation. Since that step was executed after disabling crtcs, in the failure case

[Intel-gfx] [PATCH 1/4] drm/i915: Replace some loop through encoders with intel_pipe_has_type()

2014-10-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com In the ironlake mode set code, there was two instances of a loop through encoders to find out if one of them has INTEL_OUTPUT_LVDS type. Simplify the code by deleting some lines and use intel_pipe_has_type() instead. Signed

[Intel-gfx] [PATCH 2/4] drm/i915: Make *_crtc_mode_set work on new_config

2014-10-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This shouldn't change the behavior of those functions, since they are called after the new_config is made effective and that points to the current config. In a follow up patch, the mode set sequence will be changed so

[Intel-gfx] [PATCH 3/4] drm/i915: Convert shared dpll reference count to a crtc mask

2014-10-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This will be used in a follow up patch to properly release shared DPLLs without relying on the shared_dpll field in pipe_config. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers

[Intel-gfx] [PATCH 4/4] drm/i915: Make intel_pipe_has_type() and some callers take intel_crtc

2014-10-20 Thread Ander Conselvan de Oliveira
For consistency, since that's the rule followed for internal functions. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 106 ++- 1 file changed, 54 insertions(+), 52 deletions(-) diff

[Intel-gfx] [PATCH 1/4] drm/i915: Replace some loop through encoders with intel_pipe_has_type()

2014-10-20 Thread Ander Conselvan de Oliveira
In the ironlake mode set code, there was two instances of a loop through encoders to find out if one of them has INTEL_OUTPUT_LVDS type. Simplify the code by deleting some lines and use intel_pipe_has_type() instead. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive

[Intel-gfx] [PATCH 2/4] drm/i915: Make *_find_best_dpll() take an intel_crtc insted of drm_crtc

2014-10-20 Thread Ander Conselvan de Oliveira
For consistency, since that's the rule followed for internal functions. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 37 ++-- 2 files

[Intel-gfx] [PATCH 3/4] drm/i915: Make *_crtc_mode_set() take an intel_crtc insted of drm_crtc

2014-10-20 Thread Ander Conselvan de Oliveira
For consistency, since that's the rule followed for internal functions. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 95 +--- 2 files

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Make *_crtc_mode_set work on new_config

2014-10-20 Thread Ander Conselvan de Oliveira
On 10/19/2014 05:30 PM, Daniel Vetter wrote: On Sun, Oct 19, 2014 at 04:28:57PM +0200, Daniel Vetter wrote: On Thu, Oct 09, 2014 at 03:18:03PM +0300, Ander Conselvan de Oliveira wrote: On 10/09/2014 12:11 PM, Daniel Vetter wrote: On Wed, Oct 08, 2014 at 06:32:21PM +0300, Ander Conselvan de

[Intel-gfx] [PATCH 4/8] drm/i915: Covert HSW+ to choose DPLLS before disabling CRTCs

2014-10-21 Thread Ander Conselvan de Oliveira
Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_ddi.c | 2 -- drivers/gpu/drm/i915/intel_display.c | 9 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm

[Intel-gfx] [PATCH 1/8] drm/i915: Convert shared dpll reference count to a crtc mask

2014-10-21 Thread Ander Conselvan de Oliveira
This will be used in a follow up patch to properly release shared DPLLs without relying on the shared_dpll field in pipe_config. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_debugfs.c | 4 +-- drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 6/8] drm/i915: Covert remaining platforms to choose DPLLS before disabling CRTCs

2014-10-21 Thread Ander Conselvan de Oliveira
Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9475271

[Intel-gfx] [PATCH 3/8] drm/i915: Add infrastructure for choosing DPLLs before disabling crtcs

2014-10-21 Thread Ander Conselvan de Oliveira
things early will allow the mode set to fail before actually touching the hardware. Follow up patches will convert different platforms to use the new infrastructure. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 3

[Intel-gfx] [PATCH 2/8] drm/i915: Move dpll crtc_mask and hw_state fields into separate struct

2014-10-21 Thread Ander Conselvan de Oliveira
The new struct will be used in a follow up patch to allow a current and a staged config to exist for the same shared DPLL. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_debugfs.c | 13 drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 0/8] Stage shared dpll config

2014-10-21 Thread Ander Conselvan de Oliveira
This series changes the mode set sequence so that the clock and PLL logic that was done in the *_crtc_mode_set() hooks is done before disabling crtcs. This avoids having to restore the old configuration in the case of failure, since the hardware was never touched. Ander Conselvan de Oliveira (8

[Intel-gfx] [PATCH 5/8] drm/i915: Covert ILK-IVB to choose DPLLS before disabling CRTCs

2014-10-21 Thread Ander Conselvan de Oliveira
Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index

[Intel-gfx] [PATCH 8/8] drm/i915: Don't store current shared DPLL in the new pipe_config

2014-10-21 Thread Ander Conselvan de Oliveira
Now that shared DPLLs configuration is staged, there's no need to track the current ones in the new pipe_config since those are released before making the new pipe_config effective. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 7/8] drm/i915: Remove crtc_mode_set() hook

2014-10-21 Thread Ander Conselvan de Oliveira
There's no users left after the conversion to calculate clocks before disabling crtcs during mode set. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 3 --- drivers/gpu/drm/i915/intel_display.c | 11 --- 2

Re: [Intel-gfx] [PATCH 3/8] drm/i915: Add infrastructure for choosing DPLLs before disabling crtcs

2014-10-22 Thread Ander Conselvan de Oliveira
On 10/22/2014 11:33 AM, Ville Syrjälä wrote: On Tue, Oct 21, 2014 at 04:02:04PM +0300, Ander Conselvan de Oliveira wrote: It is possible for a mode set to fail if there aren't shared DPLLS that match the new configuration requirement or other errors in clock computation. If that step

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Make *_crtc_mode_set work on new_config

2014-10-24 Thread Ander Conselvan de Oliveira
On 10/09/2014 12:11 PM, Daniel Vetter wrote: On Wed, Oct 08, 2014 at 06:32:21PM +0300, Ander Conselvan de Oliveira wrote: From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This shouldn't change the behavior of those functions, since they are called after the new_config

[Intel-gfx] [PATCH] drm/i915: Use vblank evade mechanism in mmio_flip

2014-10-24 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Currently we program just DPSCNTR and DSPSTRIDE directly from the ring interrupt handler, which is fine since the hardware guarantees that those are update atomically. When we have atomic page flips we'll want to be able

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code

2014-10-27 Thread Ander Conselvan de Oliveira
On 10/27/2014 04:25 PM, Daniel Vetter wrote: On Mon, Oct 27, 2014 at 11:08:20AM +, Damien Lespiau wrote: On Mon, Oct 27, 2014 at 10:16:06AM +0100, Daniel Vetter wrote: On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote: SKL will specialize it. Signed-off-by: Damien Lespiau

[Intel-gfx] [PATCH 3/3] drm/i915: Use vblank evade mechanism in mmio_flip

2014-10-28 Thread Ander Conselvan de Oliveira
() (Paulo) Prevent new flips the previous flip work finishes (Paulo) Don't acquire modeset locks for mmio flip work Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 30 ++ drivers/gpu/drm/i915

[Intel-gfx] [PATCH 1/3] drm/i915: Add kerneldoc for intel_pipe_update_{start, end}

2014-10-28 Thread Ander Conselvan de Oliveira
Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_sprite.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 8b80d68

[Intel-gfx] [PATCH 2/3] drm/i915: Remove modeset lock check from intel_pipe_update_start()

2014-10-28 Thread Ander Conselvan de Oliveira
-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_sprite.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index f9ddedc..c1d9547 100644 --- a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 7/9] drm/i915: Covert remaining platforms to choose DPLLS before disabling CRTCs

2014-10-29 Thread Ander Conselvan de Oliveira
Use the infrastructure added in a previous patch to choose shared DPLLs and calculate clocks before touching the hardware. v2: Don't set mode_set hooks since dev_priv is kzalloc()'d (Ville) Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm

[Intel-gfx] [PATCH 8/9] drm/i915: Remove crtc_mode_set() hook

2014-10-29 Thread Ander Conselvan de Oliveira
There's no users left after the conversion to calculate clocks before disabling crtcs during mode set. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 3 --- drivers/gpu/drm/i915/intel_display.c | 7 --- 2 files

[Intel-gfx] [PATCH v2 0/9] Stage shared dpll config

2014-10-29 Thread Ander Conselvan de Oliveira
Version 2 of the series with the comments I got so far resolved. Ander Conselvan de Oliveira (9): drm/i915: Make *_crtc_mode_set work on new_config drm/i915: Convert shared dpll reference count to a crtc mask drm/i915: Move dpll crtc_mask and hw_state fields into separate struct drm/i915

[Intel-gfx] [PATCH 1/9] drm/i915: Make *_crtc_mode_set work on new_config

2014-10-29 Thread Ander Conselvan de Oliveira
work on the staged config. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_ddi.c | 32 ++-- drivers/gpu/drm/i915/intel_display.c | 153 --- 2 files changed, 117 insertions(+), 68 deletions

[Intel-gfx] [PATCH 2/9] drm/i915: Convert shared dpll reference count to a crtc mask

2014-10-29 Thread Ander Conselvan de Oliveira
This will be used in a follow up patch to properly release shared DPLLs without relying on the shared_dpll field in pipe_config. v2: Fix white space error (Ville) Use hweight32() (Ville) Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm

[Intel-gfx] [PATCH 6/9] drm/i915: Covert ILK-IVB to choose DPLLS before disabling CRTCs

2014-10-29 Thread Ander Conselvan de Oliveira
Use the infrastructure added in a previous patch to choose shared DPLLs and calculate clocks before touching the hardware. v2: Don't set mode_set hooks since dev_priv is kzalloc()'d (Ville) Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm

[Intel-gfx] [PATCH 9/9] drm/i915: Don't store current shared DPLL in the new pipe_config

2014-10-29 Thread Ander Conselvan de Oliveira
Now that shared DPLLs configuration is staged, there's no need to track the current ones in the new pipe_config since those are released before making the new pipe_config effective. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 3/9] drm/i915: Move dpll crtc_mask and hw_state fields into separate struct

2014-10-29 Thread Ander Conselvan de Oliveira
The new struct will be used in a follow up patch to allow a current and a staged config to exist for the same shared DPLL. v2: Rebase on by mask_to_refcount()-hweight32() change. (Damien) Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Reviewed-by: Damien

[Intel-gfx] [PATCH 5/9] drm/i915: Covert HSW+ to choose DPLLS before disabling CRTCs

2014-10-29 Thread Ander Conselvan de Oliveira
Use the infrastructure added in a previous patch to choose shared DPLLs and calculate clocks before touching the hardware. v2: Don't set mode_set hooks since dev_priv is kzalloc()'d (Ville) Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm

[Intel-gfx] [PATCH 4/9] drm/i915: Add infrastructure for choosing DPLLs before disabling crtcs

2014-10-29 Thread Ander Conselvan de Oliveira
pll config if something fails before commit (Ville) Don't set compute_clock hooks since dev_priv is kzalloc()'d (Ville) Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 3 + drivers/gpu/drm/i915/intel_display.c | 142

Re: [Intel-gfx] [PATCH 1/6] drm/i915: factor out compute_config from __intel_set_mode

2014-10-29 Thread Ander Conselvan de Oliveira
picks, so either way, Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com +} + static int __intel_set_mode(struct drm_crtc *crtc, struct drm_display_mode *mode, - int x, int y, struct drm_framebuffer *fb

Re: [Intel-gfx] [PATCH 2/6] drm/i915: use compute_config in set_config

2014-10-29 Thread Ander Conselvan de Oliveira
On 10/23/2014 09:50 PM, Jesse Barnes wrote: This will allow us to consult more info before deciding whether to flip or do a full mode set. Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org --- drivers/gpu/drm/i915/intel_display.c | 36 ++-- 1 file changed,

Re: [Intel-gfx] [PATCH 3/6] drm/i915/hdmi: fetch infoframe status in get_config

2014-10-30 Thread Ander Conselvan de Oliveira
On 10/23/2014 09:50 PM, Jesse Barnes wrote: This is useful for checking things later. Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org --- drivers/gpu/drm/i915/intel_drv.h | 4 +++ drivers/gpu/drm/i915/intel_hdmi.c | 61 +++ 2 files changed, 65

Re: [Intel-gfx] [PATCH 6/6] drm/i915: calculate pfit changes in set_config

2014-10-30 Thread Ander Conselvan de Oliveira
. With the comments I made addressed, this series is Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 6/6] drm/i915: calculate pfit changes in set_config v2

2014-10-31 Thread Ander Conselvan de Oliveira
For the series, Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com On 10/30/2014 08:54 PM, Jesse Barnes wrote: This should allow us to avoid mode sets for some panel fitter config changes. v2: - fixup pfit comment (Ander) Signed-off-by: Jesse Barnes jbar

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Add kerneldoc for intel_pipe_update_{start, end}

2014-11-03 Thread Ander Conselvan de Oliveira
On 11/03/2014 02:33 PM, Daniel Vetter wrote: On Tue, Oct 28, 2014 at 03:10:12PM +0200, Ander Conselvan de Oliveira wrote: Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_sprite.c | 25 + 1 file changed

Re: [Intel-gfx] [PATCH 4/9] drm/i915: Add infrastructure for choosing DPLLs before disabling crtcs

2014-11-03 Thread Ander Conselvan de Oliveira
On 11/03/2014 03:56 PM, Daniel Vetter wrote: On Mon, Nov 03, 2014 at 02:51:27PM +0100, Daniel Vetter wrote: On Wed, Oct 29, 2014 at 11:32:33AM +0200, Ander Conselvan de Oliveira wrote: It is possible for a mode set to fail if there aren't shared DPLLS that match the new configuration

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Check pipe_config.has_dp_encoder instead of encoder types

2014-11-04 Thread Ander Conselvan de Oliveira
On 11/03/2014 03:40 PM, Daniel Vetter wrote: More concise. Noticed while reviewing Ander's patch which touched a lot of the pipe_has_type checks. Signed-off-by: Daniel Vetter daniel.vet...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 9 +++-- 1 file changed, 3 insertions(+), 6

[Intel-gfx] [PATCH] drm/i915: Make mmio flip wait for seqno in the work function

2014-11-05 Thread Ander Conselvan de Oliveira
. Since a flip cannot be queued while there is a pending flip, the two paths shouldn't ever run in parallel. We might need to revisit that if support for replacing flips is implemented though. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- I'm not sure if locking

Re: [Intel-gfx] [PATCH] drm/i915: Make mmio flip wait for seqno in the work function

2014-11-05 Thread Ander Conselvan de Oliveira
On 11/05/2014 01:23 PM, Chris Wilson wrote: On Wed, Nov 05, 2014 at 01:03:00PM +0200, Ander Conselvan de Oliveira wrote: This simplifies the code quite a bit compared to iterating over all rings during the ring interrupt. Also, it allows us to drop the mmio_flip spinlock, since the mmio_flip

Re: [Intel-gfx] [PATCH] drm: Global atomic state handling

2014-11-05 Thread Ander Conselvan de Oliveira
On 11/05/2014 12:07 AM, Daniel Vetter wrote: /** + * struct struct drm_atomic_state - the global state object for atomic updates + * @dev: parent DRM device + * @flags: state flags like async update + * @planes: pointer to array of plane pointers + * @plane_states: pointer to array of plane

[Intel-gfx] [PATCH 2/2] drm/i915: Make mmio flip wait for seqno in the work function

2014-11-05 Thread Ander Conselvan de Oliveira
. Since a flip cannot be queued while there is a pending flip, the two paths shouldn't ever run in parallel. We might need to revisit that if support for replacing flips is implemented though. v2: Don't hold dev-struct_mutext while waiting (Chris) Signed-off-by: Ander Conselvan de Oliveira

[Intel-gfx] [PATCH 1/2] drm/i915: Make __wait_seqno non-static and rename to __i915_wait_seqno

2014-11-05 Thread Ander Conselvan de Oliveira
So that it can be used by the flip code to wait for rendering without holding any locks. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 5 + drivers/gpu/drm/i915/i915_gem.c | 20 +++- 2 files changed

[Intel-gfx] [PATCH] drm/i915: Make mmio flip wait for seqno in the work function

2014-11-06 Thread Ander Conselvan de Oliveira
-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_irq.c | 3 -- drivers/gpu/drm/i915/intel_display.c | 90 +--- drivers/gpu/drm/i915/intel_drv.h | 9 +--- 3 files changed, 12 insertions(+), 90 deletions

Re: [Intel-gfx] [PATCH 2/6] drm/i915: use compute_config in set_config v3

2014-11-07 Thread Ander Conselvan de Oliveira
On 11/06/2014 12:26 AM, Jesse Barnes wrote: This will allow us to consult more info before deciding whether to flip or do a full mode set. v2: - don't use uninitialized or incorrect pipe masks in set_config failure path (Ander) v3: - fixup for pipe_config changes in compute_config

[Intel-gfx] [PATCH] drm/i915: Plug memory leak in intel_shared_dpll_start_config()

2014-11-07 Thread Ander Conselvan de Oliveira
The cleanup path would reset pll-new_config to NULL but wouldn't free the allocated memory. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH] drm/i915: use compute_config in set_config v4

2014-11-10 Thread Ander Conselvan de Oliveira
Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com On 11/07/2014 11:11 PM, Jesse Barnes wrote: This will allow us to consult more info before deciding whether to flip or do a full mode set. v2: - don't use uninitialized or incorrect pipe masks in set_config

Re: [Intel-gfx] [PATCH 1/6] drm/i915: factor out compute_config from __intel_set_mode v3

2014-11-10 Thread Ander Conselvan de Oliveira
Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com On 11/06/2014 12:26 AM, Jesse Barnes wrote: This allows us to calculate the full pipe config before we do any mode setting work. v2: - clarify comments about global vs. per-crtc mode set (Ander) - clean up

Re: [Intel-gfx] [PATCH 3/6] drm/i915/hdmi: fetch infoframe status in get_config v2

2014-11-10 Thread Ander Conselvan de Oliveira
Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com On 11/06/2014 12:26 AM, Jesse Barnes wrote: This is useful for checking things later. v2: - fix hsw infoframe enabled check (Ander) Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org --- drivers/gpu

Re: [Intel-gfx] [PATCH 5/6] drm/i915: update pipe size at set_config time

2014-11-10 Thread Ander Conselvan de Oliveira
Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com On 11/06/2014 12:26 AM, Jesse Barnes wrote: This only affects the fastboot path as-is. In that case, we simply need to make sure that we update the pipe size at the first mode set. Rather than putting it off until

Re: [Intel-gfx] [PATCH 4/6] drm/i915: check for audio and infoframe changes across mode sets v2

2014-11-10 Thread Ander Conselvan de Oliveira
Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com On 11/06/2014 12:26 AM, Jesse Barnes wrote: If these change (e.g. after a modeset following a fastboot), we need to do a full mode set. v2: - put under pipe_config check so we don't deref a null state (Jesse

Re: [Intel-gfx] [PATCH 6/6] drm/i915: calculate pfit changes in set_config v2

2014-11-10 Thread Ander Conselvan de Oliveira
On 11/06/2014 12:26 AM, Jesse Barnes wrote: This should allow us to avoid mode sets for some panel fitter config changes. v2: - fixup pfit comment (Ander) Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org --- drivers/gpu/drm/i915/intel_display.c | 61

Re: [Intel-gfx] [PATCH] drm/i915: Use correct pipe config to update pll dividers.

2014-11-11 Thread Ander Conselvan de Oliveira
Hi Bob, Thanks for the patch. Just a small comment below. On 11/11/2014 01:09 AM, Bob Paauwe wrote: Use the new pipe config values to calculate the updated pll dividers. This regression was introduced in commit 0dbdf89f27b17ae1eceed6782c2917f74cbb5d59 Author: Ander Conselvan de Oliveira

[Intel-gfx] [PATCH] drm/i915: mask tiled bit when updating ILK sprites

2012-07-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Or going from tiled to untiled may break. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_sprite.c |1 + 1 files changed, 1 insertions(+), 0 deletions

Re: [Intel-gfx] [PATCH libdrm] libkms: fix the name of the intel driver in linux_sysfs_create

2012-10-29 Thread Ander Conselvan de Oliveira
Ping? On 09/05/2012 02:30 PM, Ander Conselvan de Oliveira wrote: From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com linux_sysfs_create() checked for a driver named intel while the intel driver is called i915. This went unnoticed because in kernels 2.6.39 and after

Re: [Intel-gfx] [PATCH 2/2] drm/i915: calculate pfit changes in set_config v3

2014-11-17 Thread Ander Conselvan de Oliveira
the docs. Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org --- drivers/gpu/drm/i915/intel_display.c | 73 ++-- 1 file changed, 62 insertions(+), 11 deletions(-) diff --git

[Intel-gfx] [PATCH] drm/i915: Remove unnecessary goto in intel_primary_plane_disable()

2014-11-27 Thread Ander Conselvan de Oliveira
The same logic can be implemented without it, and it even saves a line of code. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu

Re: [Intel-gfx] [PATCH 1/9] drm: add helper to get crtc timings (v4)

2014-11-27 Thread Ander Conselvan de Oliveira
On 11/24/2014 09:52 PM, Matt Roper wrote: From: Gustavo Padovan gustavo.pado...@collabora.co.uk We need to get hdisplay and vdisplay in a few places so create a helper to make our job easier. v2 (by Matt): Use new stereo doubling function (suggested by Ville) v3 (by Matt): - Add missing

Re: [Intel-gfx] [PATCH 3/9] drm/i915: remove intel_pipe_set_base() (v4)

2014-11-27 Thread Ander Conselvan de Oliveira
Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com On 11/24/2014 09:53 PM, Matt Roper wrote: From: Gustavo Padovan gustavo.pado...@collabora.co.uk After some refactor intel_primary_plane_setplane() does the same as intel_pipe_set_base() so we can get rid

Re: [Intel-gfx] [PATCH 4/9] drm/i915: Introduce intel_prepare_cursor_plane()

2014-11-28 Thread Ander Conselvan de Oliveira
On 11/24/2014 09:53 PM, Matt Roper wrote: Primary and sprite planes have already been refactored to include a 'prepare' step which handles all the commit-time operations that could fail (i.e., pinning buffers and such). Refactor the cursor commit in a similar manner. For simplicity and

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Consolidate plane 'prepare' functions

2014-11-28 Thread Ander Conselvan de Oliveira
On 11/24/2014 09:53 PM, Matt Roper wrote: The 'prepare' step for all types of planes are pretty similar; consolidate the three 'prepare' functions into a single function. This paves the way for future integration with the atomic plane handlers. Note that we pull the 'wait for pending flips'

Re: [Intel-gfx] [PATCH 4/9] drm/i915: Introduce intel_prepare_cursor_plane()

2014-11-28 Thread Ander Conselvan de Oliveira
On 11/28/2014 02:15 PM, Ander Conselvan de Oliveira wrote: On 11/24/2014 09:53 PM, Matt Roper wrote: Primary and sprite planes have already been refactored to include a 'prepare' step which handles all the commit-time operations that could fail (i.e., pinning buffers and such). Refactor

Re: [Intel-gfx] [PATCH 4/9] drm/i915: Introduce intel_prepare_cursor_plane()

2014-12-01 Thread Ander Conselvan de Oliveira
On 11/24/2014 09:53 PM, Matt Roper wrote: Primary and sprite planes have already been refactored to include a 'prepare' step which handles all the commit-time operations that could fail (i.e., pinning buffers and such). Refactor the cursor commit in a similar manner. For simplicity and

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Consolidate plane 'prepare' functions

2014-12-01 Thread Ander Conselvan de Oliveira
On 11/24/2014 09:53 PM, Matt Roper wrote: The 'prepare' step for all types of planes are pretty similar; consolidate the three 'prepare' functions into a single function. This paves the way for future integration with the atomic plane handlers. Note that we pull the 'wait for pending flips'

Re: [Intel-gfx] [PATCH 7/9] drm/i915: Consolidate plane 'cleanup' operations

2014-12-01 Thread Ander Conselvan de Oliveira
On 11/24/2014 09:53 PM, Matt Roper wrote: All plane update functions need to unpin the old framebuffer when flipping to a new one. Pull this logic into a separate function to ease the integration with atomic plane helpers. Signed-off-by: Matt Roper matthew.d.ro...@intel.com ---

Re: [Intel-gfx] [PATCH 9/9] drm/i915: Make all plane disables use 'update_plane'

2014-12-01 Thread Ander Conselvan de Oliveira
On 11/24/2014 09:53 PM, Matt Roper wrote: If we extend the commit_plane handlers for each plane type to be able to handle fb=0, then we can easily implement plane disable via the update_plane handler. The cursor plane already works this way, and this is the direction we need to go to integrate

Re: [Intel-gfx] [PATCH 07/10] drm/i915: Consolidate plane 'cleanup' operations (v2)

2014-12-02 Thread Ander Conselvan de Oliveira
On 12/02/2014 01:40 AM, Matt Roper wrote: All plane update functions need to unpin the old framebuffer when flipping to a new one. Pull this logic into a separate function to ease the integration with atomic plane helpers. v2: Don't wait for vblank if we don't have an old fb to cleanup (Ander)

Re: [Intel-gfx] [PATCH 10/10] drm/i915: Make all plane disables use 'update_plane' (v2)

2014-12-02 Thread Ander Conselvan de Oliveira
character. With this and the comments to patch 7 fixed, feel free to use (for the series) Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Ander + return -EINVAL; + + return plane-funcs-update_plane(plane, plane-crtc, NULL

Re: [Intel-gfx] [PATCH 7/7] drm/i915: Consolidate plane 'cleanup' operations (v3)

2014-12-03 Thread Ander Conselvan de Oliveira
Reviewed-by: Ander Conselvan de Oliveira conselv...@gmail.com On 12/02/2014 05:45 PM, Matt Roper wrote: All plane update functions need to unpin the old framebuffer when flipping to a new one. Pull this logic into a separate function to ease the integration with atomic plane helpers. v2

Re: [Intel-gfx] [PATCH 10/10] drm/i915: Make all plane disables use 'update_plane' (v4)

2014-12-03 Thread Ander Conselvan de Oliveira
...@intel.com Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 93 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 71 +++ 3 files

Re: [Intel-gfx] [PATCH 10/10] drm/i915: Make all plane disables use 'update_plane' (v5)

2014-12-05 Thread Ander Conselvan de Oliveira
Reviewed-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com On 12/04/2014 08:27 PM, Matt Roper wrote: If we extend the commit_plane handlers for each plane type to be able to handle fb=0, then we can easily implement plane disable via the update_plane handler. The cursor

[Intel-gfx] [RFC][PATCH 4/8] drm/i915: Use local pipe_config varariable when available

2014-12-08 Thread Ander Conselvan de Oliveira
In function that define a local pipe_config variable to point to crtc-config, replace remaining references to crtc-config with the local variable. This makes the code more consistent and easier to change in an automated manner. --- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed,

[Intel-gfx] [RFC][PATCH 3/8] drm/i915: Pass new_config down do crtc_compute_clock

2014-12-08 Thread Ander Conselvan de Oliveira
This reduces the number of direct users of crtc-new_config. At some point we'll be able to get rid of that pointer altogether, in favor of drm core state structs. --- drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/intel_ddi.c | 29

[Intel-gfx] [RFC][PATCH 5/8] drm/i915: Don't access to crtc-new_config from intel_mode_max_pixclk()

2014-12-08 Thread Ander Conselvan de Oliveira
So that we can get rid of the new_config pointer later. --- drivers/gpu/drm/i915/intel_display.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index da5af23..a9f3034

[Intel-gfx] [RFC][PATCH 6/8] drm/i915: Remove intel_crtc-new_config pointer

2014-12-08 Thread Ander Conselvan de Oliveira
There are no more users of that pointer since the new config is now passed down the call chain during mode set. Also, when the switch to atomic happens, the right config (state) should be derived from an atomic state structure. --- drivers/gpu/drm/i915/intel_display.c | 46

[Intel-gfx] [RFC][PATCH 8/8] drm/i915: Keep drm_crtc-state in sync with intel_crtc-config

2014-12-08 Thread Ander Conselvan de Oliveira
So that atomic operations will reference the right crtc state. --- drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 462f22a..20b9e9b 100644 ---

[Intel-gfx] [RFC][PATCH 7/8] drm/i915: Make intel_crtc-config a pointer

2014-12-08 Thread Ander Conselvan de Oliveira
To match the semantics of drm_crtc-state, which this will eventually become. Following coccinelle script did most of the work. @@ struct intel_crtc *crtc; @@ -crtc-config +crtc-config @@ struct intel_crtc *crtc; identifier member; @@ -crtc-config.member +crtc-config-member @@ struct drm_crtc

[Intel-gfx] [RFC][PATCH 1/8] drm/i915: Rename struct intel_crtc_config to intel_crtc_state

2014-12-08 Thread Ander Conselvan de Oliveira
The objective is to make this structure usable with the atomic helpers, so let's start with the rename. Patch generated with coccinelle: @@ @@ -struct intel_crtc_config +struct intel_crtc_state --- drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/intel_crt.c | 6 +--

[Intel-gfx] [RFC][PATCH 0/8] drm/i915: Keep drm_crtc-state in sync

2014-12-08 Thread Ander Conselvan de Oliveira
, and by getting rid of intel_crtc-new_config and passing it down the call chain. I'm not sure if this actually goes in the right direction, so I'm sending this RFC. Thanks, Ander Ander Conselvan de Oliveira (8): drm/i915: Rename struct intel_crtc_config to intel_crtc_state drm/i915: Embedded struct

[Intel-gfx] [RFC][PATCH 2/8] drm/i915: Embedded struct drm_crtc_state in intel_crtc_state

2014-12-08 Thread Ander Conselvan de Oliveira
And get rid of the duplicate mode structures. The bulk of the patch was generated with the following semantic patch. @@ struct intel_crtc_state *state; @@ -state-adjusted_mode +state-base.adjusted_mode @@ struct intel_crtc_state *state; @@ -state-requested_mode +state-base.mode @@ struct

Re: [Intel-gfx] [RFC][PATCH 6/8] drm/i915: Remove intel_crtc-new_config pointer

2014-12-10 Thread Ander Conselvan de Oliveira
On 12/08/2014 06:36 PM, Daniel Vetter wrote: On Mon, Dec 08, 2014 at 05:21:07PM +0200, Ander Conselvan de Oliveira wrote: There are no more users of that pointer since the new config is now passed down the call chain during mode set. Also, when the switch to atomic happens, the right config

[Intel-gfx] [PATCH 0/8] Resend of drm/i915: Keep drm_crtc-state in sync

2014-12-11 Thread Ander Conselvan de Oliveira
I'm resending this series, now without the RFC status. Code is unchanged from the RFC. Ander Conselvan de Oliveira (8): drm/i915: Rename struct intel_crtc_config to intel_crtc_state drm/i915: Embedded struct drm_crtc_state in intel_crtc_state drm/i915: Pass new_config down do

[Intel-gfx] [PATCH 5/8] drm/i915: Don't access to crtc-new_config from intel_mode_max_pixclk()

2014-12-11 Thread Ander Conselvan de Oliveira
So that we can get rid of the new_config pointer later. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH 6/8] drm/i915: Remove intel_crtc-new_config pointer

2014-12-11 Thread Ander Conselvan de Oliveira
There are no more users of that pointer since the new config is now passed down the call chain during mode set. Also, when the switch to atomic happens, the right config (state) should be derived from an atomic state structure. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive

[Intel-gfx] [PATCH 1/8] drm/i915: Rename struct intel_crtc_config to intel_crtc_state

2014-12-11 Thread Ander Conselvan de Oliveira
The objective is to make this structure usable with the atomic helpers, so let's start with the rename. Patch generated with coccinelle: @@ @@ -struct intel_crtc_config +struct intel_crtc_state Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm

[Intel-gfx] [PATCH 4/8] drm/i915: Use local pipe_config varariable when available

2014-12-11 Thread Ander Conselvan de Oliveira
In function that define a local pipe_config variable to point to crtc-config, replace remaining references to crtc-config with the local variable. This makes the code more consistent and easier to change in an automated manner. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive

[Intel-gfx] [PATCH 3/8] drm/i915: Pass new_config down do crtc_compute_clock

2014-12-11 Thread Ander Conselvan de Oliveira
This reduces the number of direct users of crtc-new_config. At some point we'll be able to get rid of that pointer altogether, in favor of drm core state structs. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 3

[Intel-gfx] [PATCH 2/8] drm/i915: Embedded struct drm_crtc_state in intel_crtc_state

2014-12-11 Thread Ander Conselvan de Oliveira
intel_crtc_state state; @@ -state.adjusted_mode +state.base.adjusted_mode @@ struct intel_crtc_state state; @@ -state.requested_mode +state.base.mode Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_irq.c | 8 +- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 7/8] drm/i915: Make intel_crtc-config a pointer

2014-12-11 Thread Ander Conselvan de Oliveira
(crtc)-config @@ struct drm_crtc *crtc; identifier member; @@ -to_intel_crtc(crtc)-config.member +to_intel_crtc(crtc)-config-member Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/i915_debugfs.c | 12 +- drivers/gpu/drm/i915/i915_irq.c

[Intel-gfx] [PATCH 8/8] drm/i915: Keep drm_crtc-state in sync with intel_crtc-config

2014-12-11 Thread Ander Conselvan de Oliveira
So that atomic operations will reference the right crtc state. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm

Re: [Intel-gfx] [PATCH] drm/i915: Refactor work that can sleep out of commit (v4)

2014-12-12 Thread Ander Conselvan de Oliveira
On 12/12/2014 01:53 AM, Matt Roper wrote: Once we integrate our work into the atomic pipeline, plane commit operations will need to happen with interrupts disabled, due to vblank evasion. Our commit functions today include sleepable work, so those operations need to be split out and run either

Re: [Intel-gfx] [PATCH] drm/i915: Prepare for atomic plane helpers (v7)

2014-12-12 Thread Ander Conselvan de Oliveira
On 12/12/2014 01:54 AM, Matt Roper wrote: Add the new driver entrypoints that will be called by the atomic plane helpers. This patch does not actually switch over to the new plane helpers yet, so there should be no functional change here. Also note that although plane programming was already

Re: [Intel-gfx] [PATCH 6/7] drm/i915: Switch plane handling to atomic helpers (v5)

2014-12-12 Thread Ander Conselvan de Oliveira
On 12/09/2014 09:53 PM, Matt Roper wrote: Now that we have hooks to enable the atomic plane helpers, we can use the plane helpers for our .update_plane() and .disable_plane() entrypoints. Note that we still need to make a few small behavioral changes to the driver entrypoints here as we make

  1   2   3   4   5   6   7   8   9   10   >