From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm: Add rotation_property to mode_config and creating it Date: Mon, 28 Jul 2014 18:29:41 +0300 Message-ID: <20140728152941.GL27580@intel.com> References: <1405413629-4266-4-git-send-email-sonika.jindal@intel.com> <1405426417-18616-1-git-send-email-sonika.jindal@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 80BAD6E3B8 for ; Mon, 28 Jul 2014 08:29:45 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1405426417-18616-1-git-send-email-sonika.jindal@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: sonika.jindal@intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Jul 15, 2014 at 05:43:37PM +0530, sonika.jindal@intel.com wrote: > From: Sonika Jindal > = > v2: Adding creation of rotation_property here. > = > Signed-off-by: Sonika Jindal > --- > drivers/gpu/drm/drm_crtc.c | 3 ++- > include/drm/drm_crtc.h | 1 + > 2 files changed, 3 insertions(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 787631e..49c0747 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -1299,7 +1299,8 @@ static int drm_mode_create_standard_plane_propertie= s(struct drm_device *dev) > "type", drm_plane_type_enum_list, > ARRAY_SIZE(drm_plane_type_enum_list)); > dev->mode_config.plane_type_property =3D type; > - > + dev->mode_config.rotation_property =3D drm_mode_create_rotation_propert= y(dev, > + BIT(DRM_ROTATE_0) | BIT(DRM_ROTATE_180)); This might not make sense for other (!i915) hardware. And that's the reason why I had the driver create the property in the first place. I think Daniel was thinking that we might want to expose all the bits regardless of what the hardware supports, but I don't like that idea. There are other properties (eg. alpha blending, csc stuff, etc.) that have the same problem of hardware supporting only a (potentially small) subset of the possible values. I'd rather we didn't make life harder for userspace when the kernel can already report that certain values will never work. > return 0; > } > = > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > index ce6df4a..5545dd3 100644 > --- a/include/drm/drm_crtc.h > +++ b/include/drm/drm_crtc.h > @@ -819,6 +819,7 @@ struct drm_mode_config { > struct drm_property *dpms_property; > struct drm_property *path_property; > struct drm_property *plane_type_property; > + struct drm_property *rotation_property; > = > /* DVI-I properties */ > struct drm_property *dvi_i_subconnector_property; > -- = > 1.7.10.4 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC