<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/gpu/drm/drm_rect.c, branch v5.18.16</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.18.16</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.18.16'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-11-28T12:15:43Z</updated>
<entry>
<title>drm/rect: update kerneldoc for drm_rect_clip_scaled()</title>
<updated>2019-11-28T12:15:43Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-11-26T14:52:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=94fee4a74d04b4298892850287c2a879dbd01e2a'/>
<id>urn:sha1:94fee4a74d04b4298892850287c2a879dbd01e2a</id>
<content type='text'>
This was forgotten in f96bdf564f3e ("drm/rect: Handle rounding errors
in drm_rect_clip_scaled, v3.")

Spotted while reviewing patches from Ville touching this area.

Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Fixes: f96bdf564f3e ("drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3.")
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
Cc: Ville Syrjala &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191126145213.380079-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/rect: Keep the clipped dst rectangle in place</title>
<updated>2019-11-28T11:33:38Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2019-11-22T17:56:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2020af2dbf734a16886d5e9e1f65841641db5f33'/>
<id>urn:sha1:2020af2dbf734a16886d5e9e1f65841641db5f33</id>
<content type='text'>
Now that we've constrained the clipped source rectangle such
that it can't have negative dimensions doing the same for the
dst rectangle seems appropriate. Should at least result in
the clipped src and dst rectangles being a bit more consistent
with each other.

Cc: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191122175623.13565-4-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
</content>
</entry>
<entry>
<title>drm/rect: Keep the scaled clip bounded</title>
<updated>2019-11-28T11:33:33Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2019-11-22T17:56:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2e351705f18a80dea6398233ac21a02aff5b0597'/>
<id>urn:sha1:2e351705f18a80dea6398233ac21a02aff5b0597</id>
<content type='text'>
Limit the scaled clip to only clip at most dst_w/h pixels.
This avoids the problem with clip_scaled() not being able
to return negative values. Since new_src_w/h is now properly
bounded we can remove the clamp()s.

Cc: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Testcase: igt/kms_selftest/drm_rect_clip_scaled_signed_vs_unsigned
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191122175623.13565-3-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
</content>
</entry>
<entry>
<title>drm/rect: Avoid division by zero</title>
<updated>2019-11-28T11:33:23Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2019-11-22T17:56:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=433480c1afd44f3e1e664b85063d98cefeefa0ed'/>
<id>urn:sha1:433480c1afd44f3e1e664b85063d98cefeefa0ed</id>
<content type='text'>
Check for zero width/height destination rectangle in
drm_rect_clip_scaled() to avoid a division by zero.

Cc: stable@vger.kernel.org
Fixes: f96bdf564f3e ("drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3.")
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Testcase: igt/kms_selftest/drm_rect_clip_scaled_div_by_zero
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191122175623.13565-2-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
</content>
</entry>
<entry>
<title>drm: drop use of drmP.h in drm/*</title>
<updated>2019-05-27T16:07:03Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2019-05-26T17:35:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0500c04ea14a4143edf902d087079c4e7b2f0229'/>
<id>urn:sha1:0500c04ea14a4143edf902d087079c4e7b2f0229</id>
<content type='text'>
The use of the drmP.h header file is deprecated.
Remove use from all files in drm/*
so people do not look there and follow a bad example.

Build tested allyesconfig,allmodconfig on x86, arm etc.
Including alpha that is as always more challenging than
the rest.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-8-sam@ravnborg.org
</content>
</entry>
<entry>
<title>drm: Nuke drm_calc_{h,v}scale_relaxed()</title>
<updated>2019-02-07T11:14:06Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2019-02-06T18:32:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2ebb2428c3d4732bb0fab9522c605e6af55c2fa5'/>
<id>urn:sha1:2ebb2428c3d4732bb0fab9522c605e6af55c2fa5</id>
<content type='text'>
The fuzzy drm_calc_{h,v}scale_relaxed() helpers are no longer used.
Throw them in the bin.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190206183204.21127-1-ville.syrjala@linux.intel.com
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3.</title>
<updated>2018-05-04T09:09:54Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2018-05-03T11:22:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f96bdf564f3e7511aecdd4c35cc18ac5e0750a2f'/>
<id>urn:sha1:f96bdf564f3e7511aecdd4c35cc18ac5e0750a2f</id>
<content type='text'>
Instead of relying on a scale which may increase rounding errors,
clip src by doing: src * (dst - clip) / dst and rounding the result
away from 1, so the new coordinates get closer to 1. We won't need
to fix up with a magic macro afterwards, because our scaling factor
will never go to the other side of 1.

Changes since v1:
- Adjust dst immediately, else drm_rect_width/height on dst gives bogus
  results.
Change since v2:
- Get rid of macros and use 64-bits math.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
[mlankhorst: Add Villes comment, and rename newsrc to tmp. (Ville)]
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180503112217.37292-3-maarten.lankhorst@linux.intel.com
</content>
</entry>
<entry>
<title>drm/rect: Round above 1 &lt;&lt; 16 upwards to correct scale calculation functions.</title>
<updated>2018-05-04T08:57:52Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2018-05-03T11:22:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6f96f2000ac27b0f5f769b0bc2f0440ebfa1c3a3'/>
<id>urn:sha1:6f96f2000ac27b0f5f769b0bc2f0440ebfa1c3a3</id>
<content type='text'>
When calculating limits we want to be as pessimistic as possible,
so we have to explicitly say whether we want to round up or down
to accurately calculate whether we are below min_scale or above
max_scale.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
[mlankhorst: Fix wording in documentation. (Ville)]
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180503112217.37292-2-maarten.lankhorst@linux.intel.com
</content>
</entry>
<entry>
<title>drm/rect: Fix drm_rect_rotation_inv() docs</title>
<updated>2018-05-02T20:02:22Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2018-04-26T14:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ec66723197103eebd7f7099df6d5ea23deff679b'/>
<id>urn:sha1:ec66723197103eebd7f7099df6d5ea23deff679b</id>
<content type='text'>
An overeager sed has corrupted the drm_rect_rotation_inv()
documentation. Fix it up.

Looks like it wasn't entirely correct before the sed fail
either. We were missing _rect_ from the function names, which
also explains why the sed hit these by accident.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180426141631.15798-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI</title>
<updated>2017-05-22T07:49:48Z</updated>
<author>
<name>Robert Foss</name>
<email>robert.foss@collabora.com</email>
</author>
<published>2017-05-19T20:50:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c2c446ad29437bb92b157423c632286608ebd3ec'/>
<id>urn:sha1:c2c446ad29437bb92b157423c632286608ebd3ec</id>
<content type='text'>
Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ defines to the UAPI
as a convenience.

Ideally the DRM_ROTATE_ and DRM_REFLECT_ property ids are looked up
through the atomic API, but realizing that userspace is likely to take
shortcuts and assume that the enum values are what is sent over the
wire.

As a result these defines are provided purely as a convenience to
userspace applications.

Changes since v3:
 - Switched away from past tense in comments
 - Add define name change to previously mis-spelled DRM_REFLECT_X comment
 - Improved the comment for the DRM_MODE_REFLECT_&lt;axis&gt; comment

Changes since v2:
 - Changed define prefix from DRM_MODE_PROP_ to DRM_MODE_
 - Fix compilation errors
 - Changed comment formatting
 - Deduplicated comment lines
 - Clarified DRM_MODE_PROP_REFLECT_ comment

Changes since v1:
 - Moved defines from drm.h to drm_mode.h
 - Changed define prefix from DRM_ to DRM_MODE_PROP_
 - Updated uses of the defines to the new prefix
 - Removed include from drm_rect.c
 - Stopped using the BIT() macro

Signed-off-by: Robert Foss &lt;robert.foss@collabora.com&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Acked-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170519205017.23307-2-robert.foss@collabora.com
</content>
</entry>
</feed>
