From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Brian Starkey <brian.starkey@arm.com>
Cc: intel-gfx@lists.freedesktop.org,
Liviu Dudau <liviu.dudau@arm.com>,
dri-devel@lists.freedesktop.org,
Uma Shankar <uma.shankar@intel.com>,
Mali DP Maintainers <malidp@foss.arm.com>,
Mihail Atanassov <mihail.atanassov@arm.com>,
Johnson Lin <johnson.lin@intel.com>
Subject: Re: [PATCH 1/4] drm/uapi: The ctm matrix uses sign-magnitude representation
Date: Fri, 23 Feb 2018 16:04:10 +0200 [thread overview]
Message-ID: <20180223140410.GJ5453@intel.com> (raw)
In-Reply-To: <20180223135222.GA9478@e107564-lin.cambridge.arm.com>
On Fri, Feb 23, 2018 at 01:52:22PM +0000, Brian Starkey wrote:
> Hi Ville,
>
> On Thu, Feb 22, 2018 at 11:42:29PM +0200, Ville Syrjala wrote:
> >From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> >The documentation for the ctm matrix suggests a two's complement
> >format, but at least the i915 implementation is using sign-magnitude
> >instead. And looks like malidp is doing the same. Change the docs
> >to match the current implementation, and change the type from __s64
> >to __u64 to drive the point home.
>
> I totally agree that this is a good idea, but...
>
> >
> >Cc: dri-devel@lists.freedesktop.org
> >Cc: Mihail Atanassov <mihail.atanassov@arm.com>
> >Cc: Liviu Dudau <liviu.dudau@arm.com>
> >Cc: Brian Starkey <brian.starkey@arm.com>
> >Cc: Mali DP Maintainers <malidp@foss.arm.com>
> >Cc: Johnson Lin <johnson.lin@intel.com>
> >Cc: Uma Shankar <uma.shankar@intel.com>
> >Cc: Shashank Sharma <shashank.sharma@intel.com>
> >Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >---
> > include/uapi/drm/drm_mode.h | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> >diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> >index 2c575794fb52..b5d7d9e0eff5 100644
> >--- a/include/uapi/drm/drm_mode.h
> >+++ b/include/uapi/drm/drm_mode.h
> >@@ -598,8 +598,11 @@ struct drm_mode_crtc_lut {
> > };
> >
> > struct drm_color_ctm {
> >- /* Conversion matrix in S31.32 format. */
> >- __s64 matrix[9];
> >+ /*
> >+ * Conversion matrix in S31.32 sign-magnitude
> >+ * (not two's complement!) format.
> >+ */
> >+ __u64 matrix[9];
>
> Isn't changing the type liable to break something for someone?
I hope not. Renaming the member would be a no no, but just changing the
type should be mostly safe I think. I suppose if someone is building
something with very strict compiler -W flags and -Werror it might cause
a build failure, so I guess one might label it as a minor api break but
not an abi break.
If people think that's a serious concern I guess we can keep the
__s64, but I'd rather not give people that much rope to hang
themselves by interpreting it as 2's complement.
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-02-23 14:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 21:42 [PATCH 1/4] drm/uapi: The ctm matrix uses sign-magnitude representation Ville Syrjala
2018-02-22 21:42 ` [PATCH 2/4] drm/i915: Remove the pointless 1:1 matrix copy Ville Syrjala
2018-02-23 12:44 ` Shankar, Uma
2018-02-22 21:42 ` [PATCH 3/4] drm/i915: Rename pipe CSC to use ilk_ prefix Ville Syrjala
2018-02-23 13:05 ` Shankar, Uma
2018-02-28 13:05 ` Ville Syrjälä
2018-02-22 21:42 ` [PATCH 4/4] drm/i915: Don't mangle the CTM on pre-HSW Ville Syrjala
2018-02-23 13:33 ` Shankar, Uma
2018-02-23 13:52 ` Ville Syrjälä
2018-02-28 13:11 ` Shankar, Uma
2018-02-28 13:19 ` Ville Syrjälä
2018-02-22 22:17 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/uapi: The ctm matrix uses sign-magnitude representation Patchwork
2018-02-23 5:55 ` ✗ Fi.CI.IGT: warning " Patchwork
2018-02-23 12:39 ` [PATCH 1/4] " Shankar, Uma
2018-02-23 13:52 ` Brian Starkey
2018-02-23 14:04 ` Ville Syrjälä [this message]
2018-02-28 12:56 ` [Intel-gfx] " Ville Syrjälä
2018-02-23 16:26 ` Harry Wentland
2018-02-23 16:54 ` Ville Syrjälä
2018-03-06 7:51 ` Daniel Vetter
2018-03-06 15:41 ` Harry Wentland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180223140410.GJ5453@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=brian.starkey@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=johnson.lin@intel.com \
--cc=liviu.dudau@arm.com \
--cc=malidp@foss.arm.com \
--cc=mihail.atanassov@arm.com \
--cc=uma.shankar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.