[Intel-gfx] [PATCH 07/12] drm: Reject modes with more than 1 stereo flags set

2013-09-16 Thread Damien Lespiau
When setting a stereo 3D mode, there can be only one bit set describing the layout of the frambuffer(s). So reject invalid modes early. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu

[Intel-gfx] [PATCH 06/12] drm: Extract add_hdmi_mode() out of do_hdmi_vsdb_modes()

2013-09-16 Thread Damien Lespiau
So we respect a nice design of having similar functions at the same level, in this case: do_hdmi_vsdb_modes() - add_hdmi_mandatory_stereo_modes() - add_hdmi_mode() Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 36 +--- 1 file changed, 21

[Intel-gfx] [PATCH 08/12] drm: Set the relevant infoframe field when scanning out a 3D mode

2013-09-16 Thread Damien Lespiau
When scanning out a 3D mode on HDMI, we need to send an HDMI infoframe with the corresponding layout to the sink. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH 05/12] drm/edid: Expose mandatory stereo modes for HDMI sinks

2013-09-16 Thread Damien Lespiau
For now, let's just look at the 3D_present flag of the CEA HDMI vendor block to detect if the sink supports a small list of then mandatory 3D formats. See the HDMI 1.4a 3D extraction for detail: http://www.hdmi.org/manufacturer/specification.aspx Signed-off-by: Damien Lespiau --- driver

[Intel-gfx] [PATCH 03/12] drm: Add HDMI stereo 3D flags to struct drm_mode_modeinfo

2013-09-16 Thread Damien Lespiau
ff-by: Damien Lespiau --- include/drm/drm_crtc.h | 14 ++ include/uapi/drm/drm_mode.h | 36 ++-- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index f660ac5..bf242ac 100644 --- a/includ

[Intel-gfx] [PATCH 04/12] drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl

2013-09-16 Thread Damien Lespiau
are regular modes. v3: SET_CAP -> SET_CLIENT_CAP rename (Chris Wilson) Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 19 ++- drivers/gpu/drm/drm_ioctl.c | 14 +- include/drm/drmP.h | 3 +++ include/uapi/drm/drm.h | 9 + 4 fi

[Intel-gfx] [PATCH 09/12] drm: Track the number of buffers that compose a framebuffer

2013-09-16 Thread Damien Lespiau
DRM has supported multiple-buffers fbs since the introduction of ADDFB2. Let's track the number of buffers in a drm_framebuffer in the common structure so we can use it in the DRM core. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc_helper.c | 20 includ

[Intel-gfx] [PATCH 11/12] drm: Make drm_match_cea_mode() return the underlying 2D VIC for 3d modes

2013-09-16 Thread Damien Lespiau
When scanning out a stereo mode, the AVI infoframe vic field has to be the underlyng 2D VIC. Before that commit, we weren't matching the CEA mode because of the extra stereo flag and then were setting the VIC field in the AVI infoframe to 0. Signed-off-by: Damien Lespiau --- drivers/gp

[Intel-gfx] [PATCH 10/12] drm: Don't allow multiple buffers fb with stereo modes

2013-09-16 Thread Damien Lespiau
fbs and 2 buffers fbs (No.) So for now, and until I get access to hardware that can do that, let's just disallow 2 buffers stereo framebuffers to not introduce ABI we wouldn't be able to change afterwards. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 11 +

[Intel-gfx] [PATCH 02/12] drm: Add a SET_CLIENT_CAP ioctl

2013-09-16 Thread Damien Lespiau
SET_CAP to SET_CLIENT_CAP (Chris Wilson) Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_drv.c | 1 + drivers/gpu/drm/drm_ioctl.c | 9 + include/drm/drmP.h | 2 ++ include/uapi/drm/drm.h | 7 +++ 4 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm

[Intel-gfx] HDMI stereo support v4

2013-09-16 Thread Damien Lespiau
Next installment of the HDMI stereo 3D series, following: http://lists.freedesktop.org/archives/dri-devel/2013-September/044885.html Quite a few changes here, and it's starting to "feel right": - We now expose each stereo layout as a separate mode, distinct from the 2D mode, instead of pig

[Intel-gfx] [PATCH 01/12] drm: Move the GET_CAP macros next to the corresponding ioctl structure

2013-09-16 Thread Damien Lespiau
gs of DRM_CAP_PRIME. Reviewed-by: David Herrmann (for v2) Signed-off-by: Damien Lespiau --- include/uapi/drm/drm.h | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 272580c..3ad0640 100644 --- a/include/uapi/drm/

[Intel-gfx] [PATCH 12/12] drm: Carry over the stereo flags when adding the alternate mode

2013-09-16 Thread Damien Lespiau
This allows to expose the alternate clock versions of the stereo modes. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 6b74698..55dac77 100644 --- a/drivers/gpu/drm

Re: [Intel-gfx] [PATCH 05/12] drm/edid: Expose mandatory stereo modes for HDMI sinks

2013-09-16 Thread Damien Lespiau
On Mon, Sep 16, 2013 at 09:29:31PM +0300, Ville Syrjälä wrote: > > static int > > do_hdmi_vsdb_modes(struct drm_connector *connector, const u8 *db, u8 len) > > @@ -2582,10 +2662,15 @@ do_hdmi_vsdb_modes(struct drm_connector *connector, > > const u8 *db, u8 len) > > > > /* the declared leng

Re: [Intel-gfx] [PATCH] overlay: fix link error due to missing -lrt

2013-09-16 Thread Damien Lespiau
On Mon, Sep 16, 2013 at 03:48:18PM -0300, Rodrigo Vivi wrote: > CC: Damien Lespiau > Signed-off-by: Rodrigo Vivi Ship it! Reviewed-by: Damien Lespiau -- Damien > --- > overlay/Makefile.am | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/overlay/Makefile.am

Re: [Intel-gfx] [PATCH] overlay: fix link error due to missing -lrt

2013-09-16 Thread Damien Lespiau
On Mon, Sep 16, 2013 at 11:47:43PM +0200, Julien Cristau wrote: > On Mon, Sep 16, 2013 at 15:48:18 -0300, Rodrigo Vivi wrote: > > > CC: Damien Lespiau > > Signed-off-by: Rodrigo Vivi > > --- > > overlay/Makefile.am | 2 ++ > > 1 file changed, 2 inserti

Re: [Intel-gfx] [PATCH 11/12] drm: Make drm_match_cea_mode() return the underlying 2D VIC for 3d modes

2013-09-17 Thread Damien Lespiau
On Tue, Sep 17, 2013 at 11:22:26AM +0300, Ville Syrjälä wrote: > On Mon, Sep 16, 2013 at 06:48:54PM +0100, Damien Lespiau wrote: > > When scanning out a stereo mode, the AVI infoframe vic field has to be > > the underlyng 2D VIC. Before that commit, we weren't matching the CEA

Re: [Intel-gfx] [PATCH 10/12] drm: Don't allow multiple buffers fb with stereo modes

2013-09-17 Thread Damien Lespiau
On Tue, Sep 17, 2013 at 11:20:46AM +0300, Ville Syrjälä wrote: > +++ b/drivers/gpu/drm/drm_crtc.c > > @@ -2131,6 +2131,17 @@ int drm_mode_setcrtc(struct drm_device *dev, void > > *data, > > goto out; > > } > > > > + /* > > +* Do not allow th

Re: [Intel-gfx] HDMI stereo support v4

2013-09-17 Thread Damien Lespiau
On Mon, Sep 16, 2013 at 06:48:43PM +0100, Damien Lespiau wrote: > Next installment of the HDMI stereo 3D series, following: > http://lists.freedesktop.org/archives/dri-devel/2013-September/044885.html Seems like a v5 is shapping up. I'll summarise the discussion with Daniel on IRC ye

Re: [Intel-gfx] [PATCH 10/12] drm: Don't allow multiple buffers fb with stereo modes

2013-09-17 Thread Damien Lespiau
On Tue, Sep 17, 2013 at 12:37:48PM +0200, Daniel Vetter wrote: > I guess we should start to check that. For 3d framebuffers with 2 > separate buffer handles for each plane I think we need to add another flag > to addfb2, e.g. > > #define DRM_MODE_FB_3D_2_FRAMES (1<<1) /* separate left/right buffer

Re: [Intel-gfx] [PATCH 05/12] drm/edid: Expose mandatory stereo modes for HDMI sinks

2013-09-17 Thread Damien Lespiau
On Mon, Sep 16, 2013 at 09:29:31PM +0300, Ville Syrjälä wrote: > > +struct stereo_mandatory_mode { > > + int width, height, freq; [..] > > + unsigned int interlace_flag, layouts; > > What's the benefit of separating the two? Just that we can easily cycle through the layout flags and add a m

Re: [Intel-gfx] [PATCH 08/19] drm/i915: write D_COMP using the mailbox

2013-09-19 Thread Damien Lespiau
by this patch. > > Signed-off-by: Paulo Zanoni > Signed-off-by: Rodrigo Vivi With or without the 'from' typo fixed (can be fixed later, amended while applying): Reviewed-by: Damien Lespiau > --- > drivers/gpu/drm/i915/i915_reg.h | 4 > drivers/gpu/drm/

Re: [Intel-gfx] [PATCH] drm/i915: register backlight device also when backlight class is a module

2013-09-19 Thread Damien Lespiau
ht interface was added. > > CC: sta...@vger.kernel.org > CC: Ville Syrjälä > Signed-off-by: Jani Nikula FWIW, a quick git grep -e "#if.*def.*CONFIG" drivers/gpu/drm/i915/ did not return anything else of this kind. Reviewed-by: Damien Lespiau -- Damien > --- > d

Re: [Intel-gfx] [PATCH] drm/i915: dump crtc timings from the pipe config

2013-09-19 Thread Damien Lespiau
djusted mode. > > This will be even more important for 3D support where the crtc timings > are markedly different from the input modeline if we have > frame-by-frame 3d output enabled. > > Cc: Damien Lespiau > Signed-off-by: Daniel Vetter Reviewed-by: Damien Lespiau -- Dami

Re: [Intel-gfx] [PATCH] drm/i915: dump crtc timings from the pipe config

2013-09-19 Thread Damien Lespiau
On Thu, Sep 19, 2013 at 03:35:02PM +0200, Daniel Vetter wrote: > On Thu, Sep 19, 2013 at 02:13:38PM +0100, Damien Lespiau wrote: > > On Thu, Sep 19, 2013 at 02:53:58PM +0200, Daniel Vetter wrote: > > > I always get royally confused how a modeline with all zeros could >

[Intel-gfx] [PATCH 01/20] drm: Add a SET_CLIENT_CAP ioctl

2013-09-19 Thread Damien Lespiau
SET_CAP to SET_CLIENT_CAP (Chris Wilson) Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_drv.c | 1 + drivers/gpu/drm/drm_ioctl.c | 9 + include/drm/drmP.h | 2 ++ include/uapi/drm/drm.h | 7 +++ 4 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm

[Intel-gfx] HDMI stereo support v5

2013-09-19 Thread Damien Lespiau
v4 was: http://lists.freedesktop.org/archives/dri-devel/2013-September/045340.html Changes from v4: - The kernel is now in charge of adjusting the stereo mode timings. - There is a per-connector opt-in boolean to expose stereo modes, letting people enable stereo for each driver/connector.

[Intel-gfx] [PATCH 02/20] drm: Add HDMI stereo 3D flags to struct drm_mode_modeinfo

2013-09-19 Thread Damien Lespiau
ff-by: Damien Lespiau --- include/drm/drm_crtc.h | 14 ++ include/uapi/drm/drm_mode.h | 36 ++-- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 24f4995..825d6fa 100644 --- a/includ

[Intel-gfx] [PATCH 04/20] drm/edid: Expose mandatory stereo modes for HDMI sinks

2013-09-19 Thread Damien Lespiau
atory structure a bit more compact, fix some white space issues and add a couple of const (Ville Syrjälä) Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 110 ++--- 1 file changed, 103 insertions(+), 7 deletions(-) diff --git a/dr

[Intel-gfx] [PATCH 16/20] drm/i915: Use crtc_clock with the adjusted mode

2013-09-19 Thread Damien Lespiau
k. No functional change. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_crt.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 36 ++-- drivers/gpu/drm/i915/intel_dp.c | 11 +++ drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gp

[Intel-gfx] [PATCH 05/20] drm: Extract add_hdmi_mode() out of do_hdmi_vsdb_modes()

2013-09-19 Thread Damien Lespiau
So we respect a nice design of having similar functions at the same level, in this case: do_hdmi_vsdb_modes() - add_hdmi_mandatory_stereo_modes() - add_hdmi_mode() Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 36 +--- 1 file changed, 21

[Intel-gfx] [PATCH 18/20] drm/i915: Ask the DRM core do make stereo timings adjustements

2013-09-19 Thread Damien Lespiau
When scanning out big stereo buffers that are actually bigger that their natural 2D counterpart, we need to blow up the crtc timings as well. Not that this is only done for frame packing as this is the only stereo mode currently exposed needing this kind of ajdustements. Signed-off-by: Damien

[Intel-gfx] [PATCH 17/20] drm/i915: Use adjusted_mode in the fastboot hack to disable pfit

2013-09-19 Thread Damien Lespiau
When booting with i915.fastboot=1, we always take tha code path and end up undoing what we're trying to do with adjusted_mode. Hopefully, as the fastboot hardware readout code is using adjusted_mode as well, it should be equivalent. Signed-off-by: Damien Lespiau --- drivers/gpu/drm

[Intel-gfx] [PATCH 03/20] drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl

2013-09-19 Thread Damien Lespiau
are regular modes. v3: SET_CAP -> SET_CLIENT_CAP rename (Chris Wilson) Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 19 ++- drivers/gpu/drm/drm_ioctl.c | 14 +- include/drm/drmP.h | 3 +++ include/uapi/drm/drm.h | 9 + 4 fi

[Intel-gfx] [PATCH 08/20] drm: Make drm_match_cea_mode() return the underlying 2D VIC for 3d modes

2013-09-19 Thread Damien Lespiau
When scanning out a stereo mode, the AVI infoframe vic field has to be the underlyng 2D VIC. Before that commit, we weren't matching the CEA mode because of the extra stereo flag and then were setting the VIC field in the AVI infoframe to 0. Signed-off-by: Damien Lespiau --- drivers/gp

[Intel-gfx] [PATCH 07/20] drm: Set the relevant infoframe field when scanning out a 3D mode

2013-09-19 Thread Damien Lespiau
When scanning out a 3D mode on HDMI, we need to send an HDMI infoframe with the corresponding layout to the sink. v2: Make s3d_structure_from_display_mode() less subtle (Ville Syrjälä) Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 40

[Intel-gfx] [PATCH 09/20] drm: Carry over the stereo flags when adding the alternate mode

2013-09-19 Thread Damien Lespiau
This allows to expose the alternate clock versions of the stereo modes. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 48f1746..c24af1d 100644 --- a/drivers/gpu/drm

[Intel-gfx] [PATCH 20/20] drm/i915: Allow stereo modes on HDMI

2013-09-19 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index f21a57f..0d4403e 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 06/20] drm: Reject modes with more than 1 stereo flags set

2013-09-19 Thread Damien Lespiau
When setting a stereo 3D mode, there can be only one bit set describing the layout of the frambuffer(s). So reject invalid modes early. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu

[Intel-gfx] [PATCH 19/20] drm/i915: Prefer crtc_{h|v}display for pipe src dimensions

2013-09-19 Thread Damien Lespiau
Now that we ask to adjust the crtc timings for stereo modes, the correct pipe_src_w and pipe_src_h can be found in crtc_vdisplay and crtc_hdisplay. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[Intel-gfx] [PATCH 10/20] drm: Make exposing stereo modes a per-connector opt-in

2013-09-19 Thread Damien Lespiau
Just like with interlaced or double scan modes, make stereo modes a per-connector opt-in to give a chance to driver authors to make it work before enabling it. Suggested-by: Daniel Vetter Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc_helper.c | 8 +++- include/drm/drm_crtc.h

[Intel-gfx] [PATCH 11/20] drm: Remove clock_index from struct drm_display_mode

2013-09-19 Thread Damien Lespiau
This field was only accessed by the nouveau driver, but never set. So concluded we can rid of this one. Cc: Ben Skeggs Signed-off-by: Damien Lespiau --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 2 -- include/drm/drm_crtc.h | 1 - 2 files changed, 3 deletions(-) diff --git a

[Intel-gfx] [PATCH 14/20] drm: Implement timings adjustments for frame packing

2013-09-19 Thread Damien Lespiau
etter Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_modes.c | 51 - include/drm/drm_crtc.h | 3 ++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index ef26eb2..d9c5a34 1

[Intel-gfx] [PATCH 13/20] drm: Introduce a crtc_clock for struct drm_display_mode

2013-09-19 Thread Damien Lespiau
Just like the various timings, make it possible to have a clock field what we can tweak before giving it to hardware. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_modes.c | 1 + include/drm/drm_crtc.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH 12/20] drm: Remove synth_clock from struct drm_display_mode

2013-09-19 Thread Damien Lespiau
This field is unused. Garbage collect it. Signed-off-by: Damien Lespiau --- include/drm/drm_crtc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 011baaa..8e9716e 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -156,7

[Intel-gfx] [PATCH 15/20] drm/i915: Use crtc_clock in intel_dump_crtc_timings()

2013-09-19 Thread Damien Lespiau
We want to dump the parameters given to the hardware, so let's use crtc_clock here. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm

[Intel-gfx] [edid-decode] Finish the list of 3D layouts 3D_Structure_ALL can code for

2013-09-20 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- edid-decode.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/edid-decode.c b/edid-decode.c index bf0c3da..d3e3118 100644 --- a/edid-decode.c +++ b/edid-decode.c @@ -829,12 +829,26 @@ cea_hdmi_block(unsigned char *x

Re: [Intel-gfx] [PATCH 17/20] drm/i915: Use adjusted_mode in the fastboot hack to disable pfit

2013-09-20 Thread Damien Lespiau
On Fri, Sep 20, 2013 at 05:54:55PM +0300, Ville Syrjälä wrote: > On Thu, Sep 19, 2013 at 05:40:32PM +0100, Damien Lespiau wrote: > > When booting with i915.fastboot=1, we always take tha code path and end > > up undoing what we're trying to do with adjusted_mode. > &

[Intel-gfx] [PATCH 2/2] drm: Check the fb size against the adjusted v/hdisplay for stereo modes

2013-09-23 Thread Damien Lespiau
Some stereo modes, like frame packing, need a larger CRTC viewport than the "natural" underlying 2D mode and thus drm_crtc_check_viewport() needs to query the adjusted mode to use the correct h/vdisplay. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 8 1 fi

[Intel-gfx] [PATCH] drm: Implement timings adjustments for frame packing

2013-09-23 Thread Damien Lespiau
tiply the clock by 2 instead of reconstructing it (Ville Syrjälä) Suggested-by: Daniel Vetter Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_modes.c | 22 +- include/drm/drm_crtc.h | 3 ++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/driver

[Intel-gfx] [PATCH 1/2] drm: Factor out common CRTC viewport checking code

2013-09-23 Thread Damien Lespiau
Both setcrtc and page_flip are checking that the framebuffer is big enough for the defined crtc viewport (x, y, hdisplay, vdisplay). Factor that code out in a single function. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 70 -- 1

[Intel-gfx] Check the fb size against the correct CRTC viewport for stereo modes

2013-09-23 Thread Damien Lespiau
I've sent this 2 patches separately from the main stereo series so we can have the usual rounds of review without having to resend the full 20+ patches. Once that last bit has been reviewed as well, I'll send a consolidated series that will be a serious candidate for merging. -- Damien _

[Intel-gfx] HDMI stereo support v6

2013-09-25 Thread Damien Lespiau
v5 was: http://lists.freedesktop.org/archives/dri-devel/2013-September/045576.html Changes from v5: - Added a size check on frame packing fbs - Addressed the various reviews - All the patches now have r-b tags -- Damien ___ Intel-gfx mailing l

[Intel-gfx] [PATCH 01/22] drm: Move the GET_CAP macros next to the corresponding ioctl structure

2013-09-25 Thread Damien Lespiau
gs of DRM_CAP_PRIME. v4: Rebase on top of latest bits (DRM_CAP_ASYNC_PAGE_FLIP was introduced) Reviewed-by: David Herrmann (for v2) Signed-off-by: Damien Lespiau --- include/uapi/drm/drm.h | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/include/uapi/drm/dr

[Intel-gfx] [PATCH 02/22] drm: Add a SET_CLIENT_CAP ioctl

2013-09-25 Thread Damien Lespiau
SET_CAP to SET_CLIENT_CAP (Chris Wilson) Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_drv.c | 1 + drivers/gpu/drm/drm_ioctl.c | 9 + include/drm/drmP.h | 2 ++ include/uapi/drm/drm.h | 7 +++ 4 files changed, 19 insertions(+) diff

[Intel-gfx] [PATCH 03/22] drm: Add HDMI stereo 3D flags to struct drm_mode_modeinfo

2013-09-25 Thread Damien Lespiau
Ville Syrjälä Signed-off-by: Damien Lespiau --- include/drm/drm_crtc.h | 14 ++ include/uapi/drm/drm_mode.h | 36 ++-- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 24f4995..82

[Intel-gfx] [PATCH 04/22] drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl

2013-09-25 Thread Damien Lespiau
are regular modes. v3: SET_CAP -> SET_CLIENT_CAP rename (Chris Wilson) Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 19 ++- drivers/gpu/drm/drm_ioctl.c | 14 +- include/drm/drmP.h | 3 +++ include/uapi/drm/dr

[Intel-gfx] [PATCH 05/22] drm/edid: Expose mandatory stereo modes for HDMI sinks

2013-09-25 Thread Damien Lespiau
atory structure a bit more compact, fix some white space issues and add a couple of const (Ville Syrjälä) Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 110 ++--- 1 file changed, 103 insertions(+), 7 dele

[Intel-gfx] [PATCH 06/22] drm: Extract add_hdmi_mode() out of do_hdmi_vsdb_modes()

2013-09-25 Thread Damien Lespiau
So we respect a nice design of having similar functions at the same level, in this case: do_hdmi_vsdb_modes() - add_hdmi_mandatory_stereo_modes() - add_hdmi_mode() Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 36

[Intel-gfx] [PATCH 07/22] drm: Reject modes with more than 1 stereo flags set

2013-09-25 Thread Damien Lespiau
When setting a stereo 3D mode, there can be only one bit set describing the layout of the frambuffer(s). So reject invalid modes early. Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu

[Intel-gfx] [PATCH 09/22] drm: Make drm_match_cea_mode() return the underlying 2D VIC for 3d modes

2013-09-25 Thread Damien Lespiau
When scanning out a stereo mode, the AVI infoframe vic field has to be the underlyng 2D VIC. Before that commit, we weren't matching the CEA mode because of the extra stereo flag and then were setting the VIC field in the AVI infoframe to 0. Reviewed-by: Ville Syrjälä Signed-off-by: D

[Intel-gfx] [PATCH 08/22] drm: Set the relevant infoframe field when scanning out a 3D mode

2013-09-25 Thread Damien Lespiau
When scanning out a 3D mode on HDMI, we need to send an HDMI infoframe with the corresponding layout to the sink. v2: Make s3d_structure_from_display_mode() less subtle (Ville Syrjälä) Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 40

[Intel-gfx] [PATCH 10/22] drm: Carry over the stereo flags when adding the alternate mode

2013-09-25 Thread Damien Lespiau
This allows to expose the alternate clock versions of the stereo modes. Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_edid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 48f1746..c24af1d

[Intel-gfx] [PATCH 11/22] drm: Make exposing stereo modes a per-connector opt-in

2013-09-25 Thread Damien Lespiau
Just like with interlaced or double scan modes, make stereo modes a per-connector opt-in to give a chance to driver authors to make it work before enabling it. Suggested-by: Daniel Vetter Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc_helper.c | 8

[Intel-gfx] [PATCH 15/22] drm: Remove synth_clock from struct drm_display_mode

2013-09-25 Thread Damien Lespiau
This field is unused. Garbage collect it. Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- include/drm/drm_crtc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 011baaa..8e9716e 100644 --- a/include/drm/drm_crtc.h +++ b

[Intel-gfx] [PATCH 12/22] drm: Factor out common CRTC viewport checking code

2013-09-25 Thread Damien Lespiau
Both setcrtc and page_flip are checking that the framebuffer is big enough for the defined crtc viewport (x, y, hdisplay, vdisplay). Factor that code out in a single function. Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 70

[Intel-gfx] [PATCH 13/22] drm: Check the fb size against the adjusted v/hdisplay for stereo modes

2013-09-25 Thread Damien Lespiau
Some stereo modes, like frame packing, need a larger CRTC viewport than the "natural" underlying 2D mode and thus drm_crtc_check_viewport() needs to query the adjusted mode to use the correct h/vdisplay. Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/

[Intel-gfx] [PATCH 14/22] drm: Remove clock_index from struct drm_display_mode

2013-09-25 Thread Damien Lespiau
This field was only accessed by the nouveau driver, but never set. So concluded we can rid of this one. Acked-by: Ben Skeggs Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 2 -- include/drm/drm_crtc.h | 1 - 2 files

[Intel-gfx] [PATCH 16/22] drm: Introduce a crtc_clock for struct drm_display_mode

2013-09-25 Thread Damien Lespiau
Just like the various timings, make it possible to have a clock field what we can tweak before giving it to hardware. Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_modes.c | 1 + include/drm/drm_crtc.h | 1 + 2 files changed, 2 insertions(+) diff --git

[Intel-gfx] [PATCH 18/22] drm/i915: Use crtc_clock in intel_dump_crtc_timings()

2013-09-25 Thread Damien Lespiau
We want to dump the parameters given to the hardware, so let's use crtc_clock here. Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display

[Intel-gfx] [PATCH 17/22] drm: Implement timings adjustments for frame packing

2013-09-25 Thread Damien Lespiau
tiply the clock by 2 instead of reconstructing it (Ville Syrjälä) Suggested-by: Daniel Vetter Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_modes.c | 22 +- include/drm/drm_crtc.h | 3 ++- 2 files changed, 23 insertions(+), 2 dele

[Intel-gfx] [PATCH 19/22] drm/i915: Use crtc_clock with the adjusted mode

2013-09-25 Thread Damien Lespiau
k. No functional change. v2: Rebased on drm-intel-queued-next Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_crt.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 34 +- drivers/gpu/drm/i915/intel_dp.c

[Intel-gfx] [PATCH 20/22] drm/i915: Ask the DRM core do make stereo timings adjustements

2013-09-25 Thread Damien Lespiau
Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3c982a4..c25622d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b

[Intel-gfx] [PATCH 22/22] drm/i915: Allow stereo modes on HDMI

2013-09-25 Thread Damien Lespiau
Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 1a57758..6004f9c 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b

[Intel-gfx] [PATCH 21/22] drm/i915: Prefer crtc_{h|v}display for pipe src dimensions

2013-09-25 Thread Damien Lespiau
Now that we ask to adjust the crtc timings for stereo modes, the correct pipe_src_w and pipe_src_h can be found in crtc_vdisplay and crtc_hdisplay. v2: Add comment about why pipe_src_w/h need to be set afert set_crtcinfo() (Daniel Vetter) Reviewed-by: Ville Syrjälä Signed-off-by: Damien

[Intel-gfx] Upstreaming the stereo v6 series

2013-09-25 Thread Damien Lespiau
Hi, So this series looks like a good candidate to be merged in one tree. Beside the new 3d flags added to the mode structure, the other new API is the SET_CLIENT_CAP ioctl. It seems that this new ioctl could already be potentially useful for user space to tell us they want the "primary" plane exp

[Intel-gfx] Code stereo layouts as an enum in the mode structure

2013-09-27 Thread Damien Lespiau
Daniel noticed that it wasn't very smart to keep using one bit per stereo layout now that we don't have to or them. It's a nice final touch to the new stereo mode API extension that we should fix before committing to it. -- Damien ___ Intel-gfx mailing

[Intel-gfx] [PATCH 1/3] drm: Code stereo layouts as an enum rather than a bit field

2013-09-27 Thread Damien Lespiau
, reserving 32 values. Even with that reservation, we gain 3 bits from the previous encoding. The code adding the mandatory stereo modes needeed to be adapted as it was relying or being able to or stereo layouts together. Suggested-by: Daniel Vetter Signed-off-by: Damien Lespiau --- drivers/gpu/drm

[Intel-gfx] [PATCH 3/3] drm: Reject stereo modes with an unknown layout

2013-09-27 Thread Damien Lespiau
The kernel shouldn't accept invalid modes, just say No. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 3 +++ include/drm/drm_crtc.h | 2 ++ include/uapi/drm/drm_mode.h | 4 3 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gp

[Intel-gfx] [PATCH 2/3] drm: Revert "drm: Reject modes with more than 1 stereo flags set"

2013-09-27 Thread Damien Lespiau
Now that the coding of stereo layout has changed from a bit field to an enum, we need remove that check. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 807309f

Re: [Intel-gfx] [PATCH 1/3] drm/edid: add drm_edid_duplicate

2013-09-27 Thread Damien Lespiau
On Fri, Sep 27, 2013 at 03:08:27PM +0300, Jani Nikula wrote: > We have some code duplication related to EDID duplication. Add a helper. git grep kmemdup.*edid drivers/gpu/drm/ also returns 3 hits in nouveau here, should anyone be bored. -- Damien ___ I

[Intel-gfx] [PATCH] drm/i915: Make intel_resume_power_well() static

2013-09-28 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_pm.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index a17a86a..e6db0c6 100644 --- a/drivers/gpu/drm

[Intel-gfx] [PATCH 2/2] drm/i915: Use adjusted_mode in the fastboot hack to disable pfit

2013-09-30 Thread Damien Lespiau
When booting with i915.fastboot=1, we always take tha code path and end up undoing what we're trying to do with adjusted_mode. Hopefully, as the fastboot hardware readout code is using adjusted_mode as well, it should be equivalent. Signed-off-by: Damien Lespiau --- drivers/gpu/drm

[Intel-gfx] [PATCH 1/2] drm/i915: Add a more detailed comment about the set_base() fastboot hack

2013-09-30 Thread Damien Lespiau
Instead of it just being on the mailing list, let's put Jesse's explanation next to the code in question. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gp

Re: [Intel-gfx] [i-g-t] Stereo 3D

2013-09-30 Thread Damien Lespiau
On Fri, Sep 06, 2013 at 08:08:38PM +0100, Damien Lespiau wrote: > This series makes testdisplay able to display top and bottom, side by side > half > and frame packing stereo framebuffers. The final fb is composited from > separate > left and right images using cairo. Pushed an

[Intel-gfx] [PATCH] drm/i915: Remove yet another unused define

2013-10-04 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_debugfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index b701a26..d1bf800 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm

Re: [Intel-gfx] [PATCH 1/4] drm/i915: check that the i965g/gm 4G limit is really obeyed

2013-10-08 Thread Damien Lespiau
On Mon, Oct 07, 2013 at 05:15:45PM -0300, Rodrigo Vivi wrote: > From: Daniel Vetter > > In truly crazy circumstances shmem might give us the wrong type of > page. So be a bit paranoid and double check this. > > Reviewer: Damien Lespiau > Cc: Rob Clark > References: htt

Re: [Intel-gfx] [PATCH 1/7] drm/i915: Prevent using uninitialized MMIO funcs

2013-10-08 Thread Damien Lespiau
Signed-off-by: Ben Widawsky For the whole series: Reviewed-by: Damien Lespiau -- Damien > --- > drivers/gpu/drm/i915/i915_dma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > i

Re: [Intel-gfx] [PATCH] drm: add support for additional stereo 3D modes

2013-10-11 Thread Damien Lespiau
On Fri, Oct 11, 2013 at 02:12:14PM +0300, Ville Syrjälä wrote: > On Thu, Oct 10, 2013 at 02:19:15PM +0100, Thomas Wood wrote: > > +static int add_3d_struct_modes(struct drm_connector *connector, u16 > > structure, > > + const u8 *video_db, u8 video_len, u8 video_index) > >

Re: [Intel-gfx] [PATCH i-g-t] testdisplay: Allow getopt to print error messages

2013-10-11 Thread Damien Lespiau
On Thu, Oct 10, 2013 at 12:23:19PM +0100, Thomas Wood wrote: > By not assigning opterr, getopt will print its own error message that > includes information about whether an option is unknown or just requires > an additional argument. > > Signed-off-by: Thomas Wood Look good to me, pushed. Thanks

Re: [Intel-gfx] [PATCH] drm: add support for additional stereo 3D modes

2013-10-11 Thread Damien Lespiau
On Thu, Oct 10, 2013 at 02:19:15PM +0100, Thomas Wood wrote: > + if ((multi_present == 1 || multi_present == 2) && You could use the awesome binary literals gcc extension here and 0b01 and 0b10 to be even closer to the spec wording. There's a precedent in drivers/watchdog/sunxi_wdt.c! -- Da

[Intel-gfx] [PATCH] drm/i915: Use pipe_name() instead of the pipe number

2013-10-15 Thread Damien Lespiau
Yet another direct usage of the pipe number instead of pipe_name(). We've been tracking them lately but managed to miss this one. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] Pipe CRCs v1

2013-10-15 Thread Damien Lespiau
This series exposes the pipe CRCs on ivybridge through debugfs. It's based on the initial work from Shuang He, with some improvements to have a nice user space API. There are several points in the display pipeline where CRCs can be computed on the bits flowing there. For instance, it's usually pos

[Intel-gfx] [PATCH 01/16] drm/i915: Expose latest 200 CRC value for pipe through debugfs

2013-10-15 Thread Damien Lespiau
CRCs). v2: Quite a bit of rework here and there (Damien) Signed-off-by: Shuang He Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_debugfs.c | 33 + drivers/gpu/drm/i915/i915_drv.h | 16 drivers/gpu/drm/i915/i915_irq.c

[Intel-gfx] [PATCH 02/16] drm/i915: Add a control file for pipe CRCs

2013-10-15 Thread Damien Lespiau
Note the "return -ENODEV;" in pipe_crc_set_source(). The ctl file is disabled until the end of the series to be able to do incremental improvements. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_debugfs.c | 217 +++- drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 04/16] drm/i915: Sample the frame counter instead of a timestamp for CRCs

2013-10-15 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 8 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 03/16] drm/i915: Keep the CRC values into a circular buffer

2013-10-15 Thread Damien Lespiau
There are a few good properties to a circular buffer, for instance it has a number of entries (before we were always dumping the full buffer). Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_debugfs.c | 20 drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers

[Intel-gfx] [PATCH 05/16] drm/i915: Make switching to the same CRC source a no-op

2013-10-15 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_debugfs.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 58c6fd4..8c750d5 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b

[Intel-gfx] [PATCH 07/16] drm/i915: Empty the circular buffer when asked for a new source

2013-10-15 Thread Damien Lespiau
So we don't read out stale CRCs from a previous run left in the buffer. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_debugfs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 78

[Intel-gfx] [PATCH 09/16] drm/i915: Generalize the CRC command format for future work

2013-10-15 Thread Damien Lespiau
Let's move from writing 'A plane1' to 'pipe A plane1' to i915_pipe_crc_ctl. This will allow us to extend the interface to transcoders or DDIs in the future. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_debugfs.c | 56

<    4   5   6   7   8   9   10   11   12   13   >