[PATCH v2 02/14] drm: Pass 'name' to drm_universal_plane_init()

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Done with coccinelle for the most part. It choked on msm/mdp/mdp5/mdp5_plane.c like so: "BAD:! enum drm_plane_type type;" No idea how to deal with that, so I just fixed that up by hand. Also it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' pla

[PATCH 03/14] drm: Pass 'name' to drm_encoder_init()

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev,

[PATCH 04/14] drm: Use driver specified encoder name

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Use the encoder name passed by the driver if non-NULL, otherwise fall back to the old style name. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_crtc.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b

[PATCH v3 05/14] drm: Add crtc->name and use it in debug messages

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Show a sensible name for the crtc in debug mesages. The driver may supply its own name, otherwise the core genrates the name ("crtc-0", "crtc-1" etc.). v2: kstrdup() the name passed by the caller (Jani) v3: Generate a default name if the driver doesn't supply one Signed-of

[PATCH v3 06/14] drm: Add plane->name and use it in debug prints

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Show a sensible name for the plane in debug mesages. The driver may supply its own name, otherwise the core genrates the name ("plane-0", "plane-1" etc.). v2: kstrdup() the name passed by the caller (Jani) v3: Generate a default name if the driver doesn't supply one Signed

[PATCH 08/14] drm/i915: Use plane->name in debug prints

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 38 +--- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 39ee629cb40

[PATCH v4 09/14] drm/i915: Set crtc->name to "pipe A", "pipe B", etc.

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä v2: Fix intel_crtc leak on failure to allocate the name Use a local 'name' variable to make things easier v3: Pass the name as a function arguemnt to drm_crtc_init_with_planes() (Jani) v4: Pass the printf style format string to drm_crtc_init_with_planes() Signed-off-by:

[PATCH v3 10/14] drm/i915: Fix plane init failure paths

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Deal with errors from drm_universal_plane_init() in primary and cursor plane init paths (sprites were already covered). Also make the code neater by using goto for error handling. v2: Rebased due to drm_universal_plane_init() 'name' parameter v3: Another rebase due to s/""/

[PATCH 07/14] drm/i915: Use crtc->name in debug messages

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 55 drivers/gpu/drm/i915/intel_fbdev.c | 5 ++-- 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drive

[PATCH 11/14] drm/i915: Don't leak primary/cursor planes on crtc init failure

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Call intel_plane_destroy() instead of drm_plane_cleanup() so that we also free the plane struct itself when bailing out of the crtc init. And make intel_plane_destroy() NULL tolerant to avoid having to check for it in the caller. Signed-off-by: Ville Syrjälä --- driver

[PATCH v3 12/14] drm/i915: Give meaningful names to all the planes

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Let's name our planes in a way that makes sense wrt. the spec: - skl+ -> "plane 1A", "plane 2A", "plane 1C", "cursor A" etc. - g4x+ -> "primary A", "primary B", "sprite A", "cursor C" etc. - pre-g4x -> "plane A", "cursor B" etc. v2: Rebase on top of the fixed/cleaned error

[PATCH 13/14] drm/i915: Give encoders useful names

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Rather than let the core generate usless encoder names, let's pass in something that actually identifies the piece of hardware we're dealing with. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_crt.c| 2 +- drivers/gpu/drm/i915/intel_ddi.c| 2 +-

[PATCH 14/14] drm/i915: Add debug prints for encoder modeset hooks

2015-12-08 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä To get a better idea where exactly some error occurred during modeset, put in some debug prints to tell us when the variuous encoder hooks are getting called. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 58 +---

[PATCH v3 01/14] drm: Pass 'name' to drm_crtc_init_with_planes()

2015-12-09 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. I didn't convert drm_crtc_init() since passing the varargs through would mean either c

[PATCH v3 02/14] drm: Pass 'name' to drm_universal_plane_init()

2015-12-09 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Done with coccinelle for the most part. It choked on msm/mdp/mdp5/mdp5_plane.c like so: "BAD:! enum drm_plane_type type;" No idea how to deal with that, so I just fixed that up by hand. Also it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' pla

[PATCH v2 03/14] drm: Pass 'name' to drm_encoder_init()

2015-12-09 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev,

[PATCH v2 13/14] drm/i915: Give encoders useful names

2015-12-09 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Rather than let the core generate usless encoder names, let's pass in something that actually identifies the piece of hardware we're dealing with. v2: Use 'DSI %c' instead of 'MIPI %c' for DSI encoders (Jani) Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_

[PATCH v4 06/18] drm: Add drm_format_plane_width() and drm_format_plane_height()

2016-02-09 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Add a few helpers to get the dimensions of the chroma plane(s). v2: Add kernel-doc (Daniel) v3: Fix kerneldoc "Returns:" style (Daniel) Uninline the functions and check for num_planes (Daniel) v4: Add the required EXPORT_SYMBOL()s Cc: dri-devel at lists.freedesktop.org

[PATCH 2/3] drm/edid: Add the DMT ID in the comments

2015-04-02 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä To help with matching things to spec, include the DMT ID in the comments in out DMT mode table. Cc: "liu,lei" Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 160 ++--- 1 file changed, 80 insertions(+), 80 deletions

[PATCH 1/3] drm/edid: Fix up DMT modes

2015-04-02 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Liu Lei noticed that our 1856x1392 at 75Hz DMT mode doesn't match the spec. Fix that up, and also fix up a few other inconsistencies I discovered by parsing the spec (DMT version 1.0, revision 13) and comparing the results to our current DMT mode table. Also clean up the in

[PATCH 3/3] drm/edid: Add DMT modes with ID > 0x50

2015-04-02 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä DMT Version 1.0, Rev. 13 lists a bunch of new modes we don't currently have in our dmt mode table. So add them. The order may look a bit weird since it's not sorted based on the DMT ID, but this is the order they appear in the standard. I suppose they are ordered by the res

[PATCH 1/2] drm: Stop using drm_vblank_count() as the hw frame counter

2015-09-30 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä drm_vblank_count() returns the software counter. We should not pretend it's the hw counter since we use the hw counter to figuere out what the software counter value should be. So instead provide a new function drm_vblank_no_hw_counter() for drivers that don't have a real hw

[PATCH 2/2] drm: s/int pipe/unsigned int pipe/

2015-09-30 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Make the 'pipe' argument to drm_vblank_count() unsigned as it is everwhere else. Cc: Vincent Abriou Cc: Thierry Reding Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_irq.c | 2 +- include/drm/drmP.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH] drm: Don't zero vblank timestamps from the irq handler

2015-09-30 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä If we couldn't get a high precisions vblank timestamp, we currently store a zeroed timestamp instead and assume the next vblank irq to get us something better. This makes sense when trying to update the timestamp from eg. vblank enable. But if we do this from the vblank irq

[PATCH 2/2] drm/i915: Use intel_get_pipe_timings() and intel_mode_from_pipe_config() in intel_crtc_mode_get()

2016-04-01 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Eliminate the duplicate code for pipe timing readout in intel_crtc_mode_get() by using the functions we use for the normal state readout. Cc: dri-devel at lists.freedesktop.org Cc: Rob Kramer Cc: Daniel Vetter Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/inte

[PATCH 1/2] drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get()

2016-04-01 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä intel_crtc->config->cpu_transcoder isn't yet filled out when intel_crtc_mode_get() gets called during output probing, so we should not use it there. Instead intel_crtc_mode_get() figures out the correct transcoder on its own, and that's what we should use. If the BIOS boots

[PATCH v2 2/2] drm/i915: Use intel_get_pipe_timings() and intel_mode_from_pipe_config() in intel_crtc_mode_get()

2016-04-01 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Eliminate the duplicate code for pipe timing readout in intel_crtc_mode_get() by using the functions we use for the normal state readout. v2: Store dotclock in adjusted_mode instead of the final mode Cc: dri-devel at lists.freedesktop.org Cc: Rob Kramer Cc: Daniel Vetter

[PATCH 1/2] drm/i915: Replace nondescript 'WARN_ON(!lret)' with a sensible error message

2016-04-18 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä When a vblank wait times out in intel_atomic_wait_for_vblanks() we just get a cryptic 'WARN_ON(!ret)' backtrace in dmesg. Repace it with something that tells you what actually happened. Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_d

[PATCH 2/2] drm/atomic-helper: Print an error if vblank wait times out

2016-04-18 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä Vblank waits timing out is no a normal thing to happen, so let's inform people when it happens. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_atomic_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/

[PATCH] drm/i915: Take modeset locks around intel_modeset_setup_hw_state()

2013-12-02 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Some lower level things get angry if we don't have modeset locks during intel_modeset_setup_hw_state(). Actually the resume and lid_notify codepaths alreday hold the locks, but the init codepath doesn't, so fix that. Signed-off-by: Ville Syrj?l? --- Totally untested, but loo

[PATCH] drm: Push dirtyfb ioctl kms locking down to drivers

2013-12-04 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Not all drivers will need take all the modeset locks for dirtyfb, so push the locking down to the drivers. Signed-off-by: Ville Syrj?l? Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_crtc.c | 2 -- drivers/gpu/drm/omapdrm/omap_fb.c | 4 drivers/gpu/dr

[PATCH] drm/edid: Extract SADs properly from multiple audio data blocks

2016-03-09 Thread ville.syrj...@linux.intel.com
From: Ville Syrjälä SADs may span multiple CEA audio data blocks in the EDID. CEA-861-E says: "The order of the Data Blocks is not constrained. It is also possible to have more than one of a specific type of data block if necessary to include all of the descriptors needed to describe the sinkâ

[RFC PATCH] Atomic modeset/pageflip update

2012-10-10 Thread ville.syrj...@linux.intel.com
Here's another set of atomic modeset and pageflip patches. I just skipped spamming the list with all the patches that contain the gritty details for now. These three provide an eagle eye view of the whole thing. The full series can be found here [1]. The accompanying libdrm stuff is here [2]. So

[RFC PATCH] drm/i915: Implement atomic modesetting

2012-10-10 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Implement the atomic modeset operations. TODO: need to rewrite this for the new intel modeset code Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/Makefile|1 + drivers/gpu/drm/i915/intel_atomic.c | 1462 ++ drivers/gpu/dr

[RFC PATCH] drm: Atomic modeset ioctl

2012-10-10 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? The atomic modeset ioctl cna be used to push any number of new values for object properties. The driver can then check the full device configuration as single unit, and try to apply the changes atomically. The ioctl simply takes a list of object IDs and property IDs and their

[RFC PATCH] drm/i915: Add atomic page flip support

2012-10-10 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Utilize drm_flip to implement "atomic page flip". When involving multiple planes on one pipe, the operations on the planes must be synchronized via software since the hardware doesn't provide the means. drm_flip is used to make that happen, and to track the progress of the fli

[PATCH 01/51] drm: Be more paranoid with integer overflows

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Make sure 'width * cpp' and 'height * pitch + offset' don't exceed UINT_MAX. Signed-off-by: Ville Syrj?l? Reviewed-by: Alex Deucher --- drivers/gpu/drm/drm_crtc.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b

[PATCH 00/51] Atomic mode setting and page flip

2012-10-25 Thread ville.syrj...@linux.intel.com
Here's the latest atomic stuff. It's finally starting to look somewhat reasonable. I rebased the work on top of drm-fixes as of today. There are quite a few preparatory patches in the series. Some of those are just fixes/cleanups that could be pushed independently. What's still unfinished: - som

[PATCH 03/51] drm: Ignore blob propertys in drm_property_change_is_valid()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? In case of a blob property drm_property_change_is_valid() can't tell whether the change is valid or not. So just return true for all blob properties, and leave it up to someone else to check it. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c |3 +++ 1 files

[PATCH 04/51] drm: Add struct drm_region and assorted utility functions

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? struct drm_region represents a two dimensional region. The utility functions are there to help driver writers. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 155 include/drm/drm_crtc.h | 24 +++ 2 files

[PATCH 05/51] drm: Add drm_calc_{hscale, vscale}() utility functions

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 102 include/drm/drm_crtc.h |4 ++ 2 files changed, 106 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c ind

[PATCH 06/51] drm: Keep a copy of last plane coordinates

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? If the update_plane() operation succeeds, make a copy of the requested src and crtc coordinates, so that the the plane may be reclipped if the display mode changed later. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c |8 include/drm/drm_crtc.h

[PATCH 07/51] drm: Add restore_fbdev_mode() hook to drm_fb_helper

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Add an optional driver specific restore_fbdev_mode() hook to drm_fb_helper. If the driver doesn't provide the hook, drm_fb_helper_restore_fbdev_mode() is called directly as before. In this hook the driver can disable additional planes, cursors etc. that shouldn't be visible w

[PATCH 08/51] drm: Export drm_property_create_blob() and drm_property_destroy_blob()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c |8 +--- include/drm/drm_crtc.h |4 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index d5ceff0..ddd7252 100644 --- a/dri

[PATCH 09/51] drm: Allow signed values for range properties

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Treat a range property as signed when the unsigned minimum value is larger than the unsigned maximum value. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 17 ++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 12/51] drm: Export drm_crtc_prepare_encoders()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc_helper.c |3 ++- include/drm/drm_crtc_helper.h |1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index d30e0dd..80bbbda 100644 --- a/drivers/gpu/

[PATCH 13/51] drm: Refactor object property check code

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Refactor the code to check whether an object has a specific property to a new function. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 20 ++-- 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/driv

[PATCH 14/51] drm: Export mode<->umode conversion functions

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Export drm_crtc_convert_to_umode() and drm_crtc_convert_umode(). Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 10 ++ include/drm/drm_crtc.h |4 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c

[PATCH 15/51] drm: Make blobs resizeable

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? When first allocated blobs can be given a maximum size for which memory is allocated. Later the data inside the blob can be replaced, assuming that the maximum size is not exceeded. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 45 +

[PATCH 11/51] drm: Export drm_encoder_crtc_ok

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc_helper.c |5 +++-- include/drm/drm_crtc_helper.h |3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 1227adf..d30e0dd 100644 --- a/drivers/

[PATCH 17/51] drm: Add mode_blob and connector_ids_blob to drm_crtc

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? These will be ued by standard properties MODE and CONNECTOR_IDS. Signed-off-by: Ville Syrj?l? --- include/drm/drm_crtc.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 710f490..011f51b 100644

[PATCH 18/51] drm: Add the atomic modeset ioctl

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? This new ioctl can be used to update an arbitrary set of object properties in one operation. The ioctl simply takes a list of object IDs and property IDs and their values. For setting values of blob properties, the property value indicates the length of the data, and the actu

[PATCH 20/51] drm/i915: Add SURFLIVE register definitions

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/i915_reg.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index c2e82cc..5ea4570 100644 --- a/drivers/gpu/drm/i915/i915_reg

[PATCH 21/51] drm/i915: Implement execbuffer wait for all planes

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Add the MI_WAIT_FOR_EVENT bits for sprites, and fix up the whole thing for IVB which moved most of the bits around. Not tested at all! Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 44 +-- drivers/gpu/drm/i915/i915_

[PATCH 23/51] drm/i915: Check the framebuffer offset

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? The framebuffer offset must be aligned to (macro)pixel size. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel

[PATCH 24/51] drm/i915: Handle framebuffer offsets[]

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Take fb->offset[0] into account when calculating the linear and tile x/y offsets. For non-tiled surfaces fb->offset[0] is simply added to the linear byte offset. For tiled surfaces treat fb->offsets[0] as a byte offset into the linearized view of the surface. So we end up co

[PATCH 19/51] drm/i915: Fix display pixel format handling

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Fix support for all RGB/BGR pixel formats (except the 16:16:16:16 float format). Fix intel_init_framebuffer() to match hardware and driver limitations: * RGB332 is not supported at all * CI8 is supported * XRGB1555 & co. are supported on Gen3 and earlier * XRGB210101010 & co.

[PATCH 25/51] drm/i915: Implement proper clipping for video sprites

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Properly clip the source when the destination gets clipped by the pipe dimensions. Sadly the video sprite hardware is rather limited so it can't do proper sub-pixel postitioning. Resort to a best effort approach, where the source coordinates are rounded to the nearest (macro)

[PATCH 28/51] drm/i915: Implement restore_fbdev_mode hook

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Convert intel_fb_restore_mode to be useable as the drm_fb_helper.restore_fbdev_mode hook. This will cause all planes to be disabled when swithing back to fbcon. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/i915_dma.c |2 +- drivers/gpu/drm/i915/intel_drv.h |

[PATCH 29/51] drm/i915: Split clipping and checking from update_plane hook

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Split the update_plane() codepath into two separate steps. The first step checkis and clips the plane, and the second step actually commits the changes to the hardware. This allows the atomic modesetting code to perform all checks before clobering hardware state. The update_p

[PATCH 30/51] drm/i915: Factor out i9xx_compute_clocks() like ironlake_compute_clocks()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Split the clock stuff out. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c | 88 +- 1 files changed, 55 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_di

[PATCH 31/51] drm/i915: Consitify adjusted_mode parameter

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? i9xx_adjust_sdvo_tv_clock(), i9xx_compute_clocks() and ironlake_compute_clocks() do not modify the adjusted_mode passed in, so pass it as const. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletion

[PATCH 32/51] drm/i915: Add intel_check_clock()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? intel_check_clock() can be used to check clock validity w/o modifying hardware state. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/i915_drv.h |2 ++ drivers/gpu/drm/i915/intel_display.c | 24 2 files changed, 26 insertions(+), 0

[PATCH 27/51] drm/i915: Bad pixel formats can't reach the sprite code

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? The framebuffer pixel format is already checked by the common code. So there's no way an invalid format could reach the driver. So instead of falling back to a default format, call BUG(). Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_sprite.c |8 ++--

[PATCH 33/51] drm/i915: store cursor_handle in struct intel_crtc

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ander Conselvan de Oliveira This way it is possible to check if the cursor changed without doing any setup. Will be useful for the atomic modesetting api. --- drivers/gpu/drm/i915/intel_display.c |1 + drivers/gpu/drm/i915/intel_drv.h |2 +- 2 files changed, 2 insertions(+), 1

[PATCH 35/51] drm/i915: unstatic cursor functions for use with atomic modesetting

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/intel_display.c | 24 drivers/gpu/drm/i915/intel_drv.h | 13 + 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/int

[PATCH 37/51] drm/i915: Pull intel_pipe_set_base() out of the crtc_mode_set() functions

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? intel_pipe_set_base() (un)pins the buffers, so it can't be called from the atomic modeset paths. Pull the intel_pipe_set_base() and watermark modifications out of i9xx_crtc_mode_set() and ironlake_crtc_mode_set() into intel_crtc_mode_set(), so that the former two can be used f

[PATCH 39/51] drm/i915: Introduce intel_crtc_update_sarea_pos()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Refactor the code that stores the panning x/y position into the sarea. Make the new function intel_crtc_update_sarea_pos() available to the atomic mode setting code. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c | 43 ++-

[PATCH 40/51] drm/i915: Constify mode argument to intel_modeset_adjusted_mode()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? intel_modeset_adjusted_mode() doesn't modify the passed display mode. So pass it as const. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b

[PATCH 41/51] drm/i915: Unstatic intel_crtc_mode_fixup()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Make intel_crtc_mode_fixup() available for the upcoming atomic modesetting code. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c |6 +++--- drivers/gpu/drm/i915/intel_drv.h |4 2 files changed, 7 insertions(+), 3 deletions(-) diff --g

[PATCH 36/51] drm/i915: Unstatic intel_finish_fb()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? intel_finish_fb() will be used by the atomic modeset code, so make it non-static. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c |2 +- drivers/gpu/drm/i915/intel_drv.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/d

[PATCH 43/51] drm/i915: Split primary plane update_plane() into calc+commit phases

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Separate the part that calculates the register values from the part that writes the registers. This will be useful in the atomic page flip code. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/i915_drv.h |3 + drivers/gpu/drm/i915/intel_display.c | 145 +

[PATCH 42/51] drm/i915: Introduce intel_plane_regs

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? intel_plane_regs can be used to shadow all the typical plane registers. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_drv.h | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/dr

[PATCH 45/51] drm/i915: Implement atomic modesetting

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Implement the mandatory hooks for the atomic modeset ioctl. The code first makes a backup of the current state, then proceeds to modify the state as properties are modified. After all the properties have been handled the new state is checked, and if everything checks out, the

[PATCH 47/51] drm/i915: Add atomic page flip support

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Add support for the DRM_MODE_ATOMIC_NONBLOCK flag. The drm_flip helper provides the necessary logic to track the progress of the flips. drm_flip is driven by a few extra calls from the interrupt handling and crtc_disable code paths. Since the hardware doesn't provide inter-p

[PATCH 49/51] drm/i915: Respect primary_disabled in crtc_enable()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Check primary_disabled state before enabling the primary plane in crtc_enable() hooks. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b

[PATCH 48/51] drm/i915: Unstatic intel_enable_primary() and intel_disable_primary()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? intel_enable_primary() and intel_disable_primary() are needed in the atomic mode setting code. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_drv.h|3 +++ drivers/gpu/drm/i915/intel_sprite.c |4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-)

[PATCH 50/51] drm/i915: Enable/disable primary plane in calc_plane()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Check the active and primary_disabled flags and set the DISPLAY_PLANE_ENABLE bit accordingly in calc_plane() hook for the primary plane. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-

[PATCH 51/51] drm/i915: Add primary plane disable logic to atomic mode setting code

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Enable/disable the primary plane accordingly when the sprite plane coverage changes. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_atomic.c | 41 +++ 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/

[PATCH 02/51] drm: Constify some function arguments

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? None of drm_mode_debug_printmodeline(), drm_mode_equal(), drm_mode_width() or drm_mode_height() change the mode passed in, so make the arguments const. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_modes.c |8 include/drm/drm_crtc.h |8

[PATCH 10/51] drm: Allow drm_mode_object_find() to look up an object of any type

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? To avoid having to pass object types from userspace for atomic mode setting ioctl, allow drm_mode_object_find() to look up an object of any type. This will only work as long as the all object types share the ID space. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crt

[PATCH 16/51] drm: Add drm_flip helper

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? The drm_flip mechanism can be used to implement robust page flipping support, and also to synchronize the flips on multiple hardware scanout engines (eg. CRTCs and overlays). Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/Makefile |2 +- drivers/gpu/drm/drm_flip.c |

[PATCH 22/51] drm/i915: Check framebuffer stride more thoroughly

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Make sure the the framebuffer stride is smaller than the maximum accepted by any plane. Also when using a tiled memory make sure the object stride matches the framebuffer stride. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c | 18 +

[PATCH 26/51] drm/i915: pixel_size == cpp

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Use drm_format_plane_cpp() to get 'pixel_size' in the sprite code. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_sprite.c | 19 +++ 1 files changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers

[PATCH 38/51] drm/i915: Unstatic intel_crtc_update_sarea()

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Make intel_crtc_update_sarea() available for the atomic mode setting code. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_display.c |4 ++-- drivers/gpu/drm/i915/intel_drv.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH 44/51] drm/i915: Split sprite update_plane() into calc+commit phases

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Separate the part that calculates the register values from the part that writes the registers. This will be useful in the atomic page flip code. Also move the watermark magic into a prepare function that can be performed outside the critical parts of the atomic page flip code.

[PATCH 46/51] drm/i915: Add support for atomic modesetting completion events

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Send completion events when the atomic modesetting operations has finished succesfully. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_atomic.c | 195 ++- 1 files changed, 192 insertions(+), 3 deletions(-) diff --git a/drivers/

[PATCH 34/51] drm/i915: split cursor setting code into prepare/commit/unref parts

2012-10-25 Thread ville.syrj...@linux.intel.com
From: Ander Conselvan de Oliveira The atomic mode setting API will need to pin the cursor bo without making changes to the current setup. Only on a later stage the cursor registers can be written and the previous bo released. This patch splits intel_crtc_cursor_set() into three parts: prepare, c

[RFC][PATCH] Atomic page flip WIP

2012-09-12 Thread ville.syrj...@linux.intel.com
I'm posting this as rather raw just to get a bit more substance to the discussions. The drm_flip thingy may seem a bit too mid-layerish for people's taste, but at least it is almost completely driven by explicit function calls from the driver (the wq side is the exception naturally). I originall

[RFC][PATCH 1/4] drm/i915: Try to commit single pipe in one go

2012-09-12 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_atomic.c | 23 --- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index e439c04..e9eaa8a 100644 --- a/drivers/gpu/drm/i915/intel_a

[RFC][PATCH 2/4] drm: Add drm_flip helper

2012-09-12 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? The drm_flip mechanism can be used to implement robust page flipping support, and also to synchronize the flips on multiple hardware scanout engines (eg. CRTCs and overlays). Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/Makefile |2 +- drivers/gpu/drm/drm_flip.c |

[RFC][PATCH 3/4] drm: i915: Pass gem object to intel_finish_fb()

2012-09-12 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? intel_finish_fb() has no use for the drm_framebuffer metadata, so pass the gem object directly. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/i915/intel_atomic.c |2 +- drivers/gpu/drm/i915/intel_display.c |7 +++ drivers/gpu/drm/i915/intel_drv.h |2

[RFC][PATCH 4/4] drm: i915: Atomic pageflip WIP

2012-09-12 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Use the drm_flip helper to implement atomic page flipping. Work in progress. Ignore the huge mess in intel_sprite.c for now. --- drivers/gpu/drm/i915/i915_drv.h |4 + drivers/gpu/drm/i915/i915_irq.c | 10 +- drivers/gpu/drm/i915/intel_atomic.c | 449 +++

[PATCH 1/4] drm: Move drm_format_num_planes() to drm_crtc.c

2012-04-05 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? There will be a need for this function in drm_crtc.c later. This avoids making drm_crtc.c depend on drm_crtc_helper.c. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c| 32 drivers/gpu/drm/drm_crtc_helper.c | 33 --

[PATCH 2/4] drm: Add drm_format_plane_cpp() utility function

2012-04-05 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? This function returns the bytes per pixel value based on the pixel format and plane index. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 45 include/drm/drm_crtc.h |1 + 2 files changed, 46 insertions(+)

[PATCH 3/4] drm: Add drm_format_{horz, vert}_chroma_subsampling() utility functions

2012-04-05 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? These functions return the chroma subsampling factors for the specified pixel format. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 60 include/drm/drm_crtc.h |2 + 2 files changed, 62 insertions(+), 0 d

[PATCH 4/4] drm: Add sanity checks to framebuffer creation

2012-04-05 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? Perform some basic sanity check on some of the parameters in drm_mode_fb_cmd2. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 47 --- 1 files changed, 43 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm

[PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M}

2012-04-20 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? The NV12M/YUV420M formats are identical to the already existing standard NV12/YUV420 formats. The M variants will be removed, so convert the driver to use the standard names. Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Signed-off-by: Ville Syrj?l?

[PATCH 2/2] drm: Drop the NV12M and YUV420M formats

2012-04-20 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? The NV12M/YUV420M formats are identical to the NV12/YUV420 formats. So just remove these duplicated format names. This might look like breaking the ABI, but the code has never actually accepted these formats, so nothing can be using them. Signed-off-by: Ville Syrj?l? --- i

[PATCH] drm: Initialize object type when using DRM_MODE() macro

2012-08-14 Thread ville.syrj...@linux.intel.com
From: Ville Syrj?l? DRM_MODE() macro doesn't initialize the type of the base drm object. When a copy is made of the mode, the object type is overwritten with zero, and the the object can no longer be found by drm_mode_object_find() due to the type check failing. Signed-off-by: Ville Syrj?l? ---

<    1   2   3   4   5   6   7   8   9   10   >