From patchwork Fri Oct 26 01:32:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 10656883 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3389514BD for ; Fri, 26 Oct 2018 01:36:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22B892C75A for ; Fri, 26 Oct 2018 01:36:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2136A2C77B; Fri, 26 Oct 2018 01:36:59 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BC2892C75A for ; Fri, 26 Oct 2018 01:36:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EF2FD6E042; Fri, 26 Oct 2018 01:36:56 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3368D6E042; Fri, 26 Oct 2018 01:36:56 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 18:36:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,426,1534834800"; d="scan'208";a="274543670" Received: from dk-chv.jf.intel.com ([10.54.75.52]) by fmsmga005.fm.intel.com with ESMTP; 25 Oct 2018 18:36:55 -0700 From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Date: Thu, 25 Oct 2018 18:32:55 -0700 Message-Id: <20181026013256.30808-1-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/2] drm/plane: Export drm_plane_check_pixel_format() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dhinakaran Pandiyan , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP i915 will make use of this to fail early during framebuffer creation. Suggested-by: Ville Syrjälä Cc: dri-devel@lists.freedesktop.org Cc: Ville Syrjälä Signed-off-by: Dhinakaran Pandiyan --- drivers/gpu/drm/drm_plane.c | 1 + include/drm/drm_plane.h | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 1fa98bd12003..e834788619d1 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -589,6 +589,7 @@ int drm_plane_check_pixel_format(struct drm_plane *plane, return 0; } +EXPORT_SYMBOL(drm_plane_check_pixel_format); static int __setplane_check(struct drm_plane *plane, struct drm_crtc *crtc, diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index 0a0834bef8bd..8637b5239eb3 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -763,6 +763,17 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev, return mo ? obj_to_plane(mo) : NULL; } +/** + * drm_plane_check_pixel_format - check format and modifier support. + * @plane: plane to check support against. + * @format: pixel format to check support for. + * @modifier: format modifier to check support for. + * + * Returns 0 on success or negative error code on failure. + */ +int drm_plane_check_pixel_format(struct drm_plane *plane, + u32 format, u64 modifier); + /** * drm_for_each_plane_mask - iterate over planes specified by bitmask * @plane: the loop cursor