From patchwork Thu Jan 22 00:35:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Roper X-Patchwork-Id: 5681261 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BDDEAC058E for ; Thu, 22 Jan 2015 00:36:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F092A20304 for ; Thu, 22 Jan 2015 00:36:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 170B2202FF for ; Thu, 22 Jan 2015 00:36:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 880B26E2DF; Wed, 21 Jan 2015 16:36:26 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 29AEA6E2D8; Wed, 21 Jan 2015 16:36:25 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 21 Jan 2015 16:33:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,444,1418112000"; d="scan'208";a="673780843" Received: from mdroper-hswdev.fm.intel.com (HELO mdroper-hswdev) ([10.1.134.215]) by orsmga002.jf.intel.com with ESMTP; 21 Jan 2015 16:36:20 -0800 Received: from mattrope by mdroper-hswdev with local (Exim 4.82) (envelope-from ) id 1YE5ku-0006xZ-8L; Wed, 21 Jan 2015 16:36:16 -0800 From: Matt Roper To: intel-gfx@lists.freedesktop.org Subject: [PATCH 01/10] drm: Add rotation value to plane state Date: Wed, 21 Jan 2015 16:35:40 -0800 Message-Id: <1421886949-26704-2-git-send-email-matthew.d.roper@intel.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1421886949-26704-1-git-send-email-matthew.d.roper@intel.com> References: <1421886949-26704-1-git-send-email-matthew.d.roper@intel.com> Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The rotation property is shared by multiple drivers, so it makes sense to store the rotation value (for atomic-converted drivers) in the common plane state so that core code can eventually access it as well. Cc: dri-devel@lists.freedesktop.org Suggested-by: Daniel Vetter Signed-off-by: Matt Roper --- drivers/gpu/drm/drm_atomic.c | 2 ++ include/drm/drm_crtc.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index af3f3df..4c5c9c3 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -387,6 +387,8 @@ int drm_atomic_plane_set_property(struct drm_plane *plane, state->src_w = val; } else if (property == config->prop_src_h) { state->src_h = val; + } else if (property == config->rotation_property) { + state->rotation = val; } else if (plane->funcs->atomic_set_property) { return plane->funcs->atomic_set_property(plane, state, property, val); diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 65da9fb..c6f3d81d 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -760,6 +760,9 @@ struct drm_plane_state { uint32_t src_x, src_y; uint32_t src_h, src_w; + /* Plane rotation */ + unsigned int rotation; + struct drm_atomic_state *state; };