From patchwork Mon Jan 18 15:15:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kulkarni, Vandita" X-Patchwork-Id: 8053171 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EDD2B9F1CC for ; Mon, 18 Jan 2016 07:32:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2EDF02025A for ; Mon, 18 Jan 2016 07:32:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 42FD320251 for ; Mon, 18 Jan 2016 07:32:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BDA446E400; Sun, 17 Jan 2016 23:32:28 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 8AEE46E3FC for ; Sun, 17 Jan 2016 23:32:24 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 17 Jan 2016 23:32:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,311,1449561600"; d="scan'208";a="883721852" Received: from vandita-desktop.iind.intel.com ([10.223.26.11]) by fmsmga001.fm.intel.com with ESMTP; 17 Jan 2016 23:32:23 -0800 From: Vandita Kulkarni To: intel-gfx@lists.freedesktop.org Date: Mon, 18 Jan 2016 20:45:41 +0530 Message-Id: <1453130143-7228-8-git-send-email-vandita.kulkarni@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453130143-7228-1-git-send-email-vandita.kulkarni@intel.com> References: <1453130143-7228-1-git-send-email-vandita.kulkarni@intel.com> Cc: vandita kulkarni Subject: [Intel-gfx] [PATCH 7/9] drm/i915: Support blend func on primary X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_MED, 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 From: vandita kulkarni Check blend state set by blend properties and set alpha blending accordingly. Signed-off-by: vandita kulkarni --- drivers/gpu/drm/i915/intel_display.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 5fb281b..97b716f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3127,7 +3127,10 @@ static void skylake_update_primary_plane(struct drm_plane *plane, PLANE_CTL_PIPE_GAMMA_ENABLE | PLANE_CTL_PIPE_CSC_ENABLE; - plane_ctl |= skl_plane_ctl_format(fb->pixel_format, false, false); + plane_ctl |= skl_plane_ctl_format(fb->pixel_format, + plane_state->premultiplied_alpha, + plane_state->drop_alpha); + plane_ctl |= skl_plane_ctl_tiling(fb->modifier[0]); plane_ctl |= PLANE_CTL_PLANE_GAMMA_DISABLE; plane_ctl |= skl_plane_ctl_rotation(rotation); @@ -12080,6 +12083,10 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, intel_crtc->atomic.wait_vblank = true; intel_crtc->atomic.update_fbc |= visible || mode_changed; + + ret = intel_plane_state_check_blend(plane_state); + if (ret) + return ret; break; case DRM_PLANE_TYPE_CURSOR: break; @@ -14259,6 +14266,9 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev, if (INTEL_INFO(dev)->gen >= 4) intel_create_rotation_property(dev, primary); + if (INTEL_INFO(dev)->gen == 9) + intel_plane_add_blend_properties(primary); + drm_plane_helper_add(&primary->base, &intel_plane_helper_funcs); return &primary->base;