From patchwork Mon Aug 31 20:02:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Chrisanthus, Anitha" X-Patchwork-Id: 11746943 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11D991575 for ; Mon, 31 Aug 2020 20:03:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB8F92078B for ; Mon, 31 Aug 2020 20:03:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB8F92078B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 320D76E43A; Mon, 31 Aug 2020 20:03:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id B2AF66E378 for ; Mon, 31 Aug 2020 20:03:05 +0000 (UTC) IronPort-SDR: hhRK801a5P+CSCvTxknvztpNApp6w7s2we00GNb++w0lXHUWWylq/79cxwJJVIDLOXjUdADs30 VsFb6RF13D1w== X-IronPort-AV: E=McAfee;i="6000,8403,9730"; a="156308791" X-IronPort-AV: E=Sophos;i="5.76,376,1592895600"; d="scan'208";a="156308791" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2020 13:03:05 -0700 IronPort-SDR: PCnUA4O6D3gEkT04dOSdV75ghT4mCQ6j4lcw8yJmzsZ8iYA8h3mw9pA1OaHzrXqhktZrhRIQ/c ZgWsZKn4NdpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,376,1592895600"; d="scan'208";a="325054068" Received: from sgovind3-mobl.amr.corp.intel.com (HELO achrisan-DESK2.amr.corp.intel.com) ([10.255.86.92]) by fmsmga004.fm.intel.com with ESMTP; 31 Aug 2020 13:03:04 -0700 From: Anitha Chrisanthus To: dri-devel@lists.freedesktop.org, anitha.chrisanthus@intel.com, bob.j.paauwe@intel.com, edmund.j.dea@intel.com Subject: [PATCH v7 2/4] drm/kmb: Add support for KeemBay Display Date: Mon, 31 Aug 2020 13:02:50 -0700 Message-Id: <1598904172-30865-3-git-send-email-anitha.chrisanthus@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598904172-30865-1-git-send-email-anitha.chrisanthus@intel.com> References: <1598904172-30865-1-git-send-email-anitha.chrisanthus@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.vetter@intel.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is a basic KMS atomic modesetting display driver for KeemBay family of SOCs. Driver has no 2D or 3D graphics.It calls into the ADV bridge driver at the connector level. Single CRTC with LCD controller->mipi DSI-> ADV bridge Only 1080p resolution and single plane is supported at this time. v2: moved extern to .h, removed license text use drm_dev_init, upclassed dev_private, removed HAVE_IRQ.(Sam) v3: Squashed all 59 commits to one v4: review changes from Sam Ravnborg renamed dev_p to kmb moved clocks under kmb_clock, consolidated clk initializations use drmm functions use DRM_GEM_CMA_DRIVER_OPS_VMAP v5: corrected spellings v6: corrected checkpatch warnings v7: review changes Sam Ravnborg and Thomas Zimmerman removed kmb_crtc.h kmb_crtc_cleanup (Thomas) renamed mode_set, kmb_load, inlined unload (Thomas) moved remaining logging to drm_*(Thomas) re-orged driver initialization (Thomas) moved plane_status to drm_private (Sam) removed unnecessary logs and defines and ifdef codes (Sam) call helper_check in plane_atomic_check (Sam) renamed set to get for bpp and format functions(Sam) use drm helper functions for reset, duplicate/destroy state instead of kmb functions (Sam) removed kmb_priv from kmb_plane and removed kmb_plane_state (Sam) Cc: Sam Ravnborg Signed-off-by: Anitha Chrisanthus Reviewed-by: Bob Paauwe --- drivers/gpu/drm/kmb/kmb_crtc.c | 224 +++++++++++++ drivers/gpu/drm/kmb/kmb_drv.c | 676 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/kmb/kmb_drv.h | 170 ++++++++++ drivers/gpu/drm/kmb/kmb_plane.c | 480 ++++++++++++++++++++++++++++ drivers/gpu/drm/kmb/kmb_plane.h | 110 +++++++ 5 files changed, 1660 insertions(+) create mode 100644 drivers/gpu/drm/kmb/kmb_crtc.c create mode 100644 drivers/gpu/drm/kmb/kmb_drv.c create mode 100644 drivers/gpu/drm/kmb/kmb_drv.h create mode 100644 drivers/gpu/drm/kmb/kmb_plane.c create mode 100644 drivers/gpu/drm/kmb/kmb_plane.h diff --git a/drivers/gpu/drm/kmb/kmb_crtc.c b/drivers/gpu/drm/kmb/kmb_crtc.c new file mode 100644 index 0000000..a684331 --- /dev/null +++ b/drivers/gpu/drm/kmb/kmb_crtc.c @@ -0,0 +1,224 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright © 2018-2020 Intel Corporation + */ + +#include +#include +#include + +#include