From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH i-g-t 05/43] igt_kms: Add support for setting plane rotation Date: Fri, 11 Jul 2014 08:40:29 +0200 Message-ID: <20140711064029.GT17271@phenom.ffwll.local> References: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> <1405015244-11370-6-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by gabe.freedesktop.org (Postfix) with ESMTP id CFD456E7F9 for ; Thu, 10 Jul 2014 23:40:18 -0700 (PDT) Received: by mail-we0-f182.google.com with SMTP id q59so559397wes.27 for ; Thu, 10 Jul 2014 23:40:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1405015244-11370-6-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 10, 2014 at 07:00:06PM +0100, Damien Lespiau wrote: > +typedef enum { > + /* this maps to the kernel API */ > + IGT_ROTATION_0 = 1 << 0, > + IGT_ROTATION_90 = 1 << 1, > + IGT_ROTATION_180 = 1 << 2, > + IGT_ROTATION_270 = 1 << 3, > +} igt_rotation_t; Should we also add the flip X/Y bits, even if we currently don't support this in the kernel? -Daniel > + > #include "igt_fb.h" > > struct kmstest_connector_config { > @@ -116,6 +124,7 @@ typedef struct { > unsigned int fb_changed : 1; > unsigned int position_changed : 1; > unsigned int panning_changed : 1; > + unsigned int rotation_changed : 1; > /* > * drm_plane can be NULL for primary and cursor planes (when not > * using the atomic modeset API) > @@ -129,6 +138,7 @@ typedef struct { > int crtc_x, crtc_y; > /* panning offset within the fb */ > unsigned int pan_x, pan_y; > + igt_rotation_t rotation; > } igt_plane_t; > > struct igt_pipe { > @@ -184,6 +194,7 @@ static inline bool igt_plane_supports_rotation(igt_plane_t *plane) > void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb); > void igt_plane_set_position(igt_plane_t *plane, int x, int y); > void igt_plane_set_panning(igt_plane_t *plane, int x, int y); > +void igt_plane_set_rotation(igt_plane_t *plane, igt_rotation_t rotation); > > void igt_wait_for_vblank(int drm_fd, enum pipe pipe); > > -- > 1.8.3.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch