[Intel-gfx] [PATCH 2/3] drm/i915: Add 180 degree primary plane rotation support
Jindal, Sonika
sonika.jindal at intel.com
Tue Jun 24 12:26:57 CEST 2014
On 6/24/2014 3:44 PM, Damien Lespiau wrote:
> On Mon, Jun 23, 2014 at 11:06:00AM +0530, sonika.jindal at intel.com wrote:
>> From: Sonika Jindal <sonika.jindal at intel.com>
>>
>> Primary planes support 180 degree rotation. Expose the feature
>> through rotation drm property.
>>
>> v2: Calculating linear/tiled offsets based on pipe source width and
>> height. Added 180 degree rotation support in ironlake_update_plane.
>>
>> v3: Checking if CRTC is active before issueing update_plane. Added
>> wait for vblank to make sure we dont overtake page flips. Disabling
>> FBC since it does not work with rotated planes.
>>
>> v4: Updated rotation checks for pending flips, fbc disable. Creating
>> rotation property only for Gen4 onwards. Property resetting as part
>> of lastclose.
>>
>> v5: Resetting property in i915_driver_lastclose properly for planes
>> and crtcs. Fixed linear offset calculation that was off by 1 w.r.t
>> width in i9xx_update_plane and ironlake_update_plane. Removed tab
>> based indentation and unnecessary braces in intel_crtc_set_property
>> and intel_update_fbc. FBC and flip related checks should be done only
>> for valid crtcs.
>>
>> v6: Minor nits in FBC disable checks for comments in intel_crtc_set_property
>> and positioning the disable code in intel_update_fbc.
>>
>> v7: In case rotation property on inactive crtc is updated, we return
>> successfully printing debug log as crtc is inactive and only property change
>> is preserved.
>>
>> v8: update_plane is changed to update_primary_plane, crtc->fb is changed to
>> crtc->primary->fb and return value of update_primary_plane is ignored.
>>
>> v9: added rotation property to primary plane instead of crtc. Removing reset
>> of rotation property from lastclose. rotation_property is moved to drm_plane,so
>> drm layer will take care of resetting.
>>
>> Testcase: igt/kms_rotation_crc
>>
>> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
>> Cc: Jani Nikula <jani.nikula at linux.intel.com>
>> Cc: dri-devel at lists.freedesktop.org
>> Cc: vijay.a.purushothaman at intel.com
>> Signed-off-by: Uma Shankar <uma.shankar at intel.com>
>> Signed-off-by: Sagar Kamble <sagar.a.kamble at intel.com>
>> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_dma.c | 5 --
>> drivers/gpu/drm/i915/i915_reg.h | 1 +
>> drivers/gpu/drm/i915/intel_display.c | 94 ++++++++++++++++++++++++++++++++--
>> drivers/gpu/drm/i915/intel_pm.c | 8 +++
>> 4 files changed, 98 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
>> index 5e583a1..4b6b911 100644
>> --- a/drivers/gpu/drm/i915/i915_dma.c
>> +++ b/drivers/gpu/drm/i915/i915_dma.c
>> @@ -1938,14 +1938,9 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file)
>> */
>> void i915_driver_lastclose(struct drm_device *dev)
>> {
>> - struct drm_i915_private *dev_priv = dev->dev_private;
>> -
>> /* On gen6+ we refuse to init without kms enabled, but then the drm core
>> * goes right around and calls lastclose. Check for this and don't clean
>> * up anything. */
>> - if (!dev_priv)
>> - return;
>> -
>
> Hum, I don't think this was supposed to be removed?
>
Yes, my mistake.. I will revert it and resend the patch.
More information about the Intel-gfx
mailing list