From patchwork Tue Jul 26 16:06:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 9248371 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 89503607D8 for ; Tue, 26 Jul 2016 16:08:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ABAA271FD for ; Tue, 26 Jul 2016 16:08:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FB91272AA; Tue, 26 Jul 2016 16:08:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DCCC271FD for ; Tue, 26 Jul 2016 16:08:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C0D946E545; Tue, 26 Jul 2016 16:08:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 906896E535; Tue, 26 Jul 2016 16:08:11 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 26 Jul 2016 09:07:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,425,1464678000"; d="scan'208"; a="1014201718" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga001.fm.intel.com with SMTP; 26 Jul 2016 09:07:12 -0700 Received: by stinkbox (sSMTP sendmail emulation); Tue, 26 Jul 2016 19:07:11 +0300 From: ville.syrjala@linux.intel.com To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/9] drm: Store clipped src/dst coordinatee in drm_plane_state Date: Tue, 26 Jul 2016 19:06:57 +0300 Message-Id: <1469549224-1860-3-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1469549224-1860-1-git-send-email-ville.syrjala@linux.intel.com> References: <1469549224-1860-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Cc: intel-gfx@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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä Pretty much all driver will have need for the clipped plane coordinates, so let's stuff then into drm_plane_state. Signed-off-by: Ville Syrjälä Reviewed-by: Sean Paul --- include/drm/drm_crtc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 3edeaf88ebc0..00a1868940b8 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -35,6 +35,7 @@ #include #include #include +#include struct drm_device; struct drm_mode_set; @@ -1409,6 +1410,9 @@ struct drm_connector { * @src_w: width of visible portion of plane (in 16.16) * @src_h: height of visible portion of plane (in 16.16) * @rotation: rotation of the plane + * @src: clipped source coordinates of the plane (in 16.16) + * @dst: clipped destination coordinates of the plane + * @visible: visibility of the plane * @state: backpointer to global drm_atomic_state */ struct drm_plane_state { @@ -1429,6 +1433,15 @@ struct drm_plane_state { /* Plane rotation */ unsigned int rotation; + /* Clipped coordinates */ + struct drm_rect src, dst; + + /* + * Is the plane actually visible? Can be false even + * if fb!=NULL and crtc!=NULL, due to clipping. + */ + bool visible; + struct drm_atomic_state *state; };