From patchwork Thu Nov 30 14:43:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13474596 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 80016C4167B for ; Thu, 30 Nov 2023 14:43:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 081AB10E04A; Thu, 30 Nov 2023 14:43:55 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id B0CC510E0E6 for ; Thu, 30 Nov 2023 14:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701355434; x=1732891434; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Tnx5A2frCGMjjydYfSCMfsgF4g/incGzEQj/tmU7bhw=; b=StRw1laWB8ILxCtPV1g4s0X53ERjH5gxHFm+7vBjhffW/NMQ0By1iuhf CxeLxDfSziBD4Qi2GGJr52MiznTIcCQ6wfcB3T5er/pYK0GOs56DdBYrH WWbl/vK2YiEquSm+PJnofRY8Z6W3xUAY1kbwY68loTO1KS8tt4Jsos76f RGqQVWjbsZshakDs1OxXht8Hy353xPPfItSmNKUNruBu/cizH1pUw/Ar9 6ds5cpdaw0lWY5zIN1RmfVqkgpUvpixr4qvlkvb+gLd1RVhHhCQBI85AN xYAy+Htm8FDzEBR8P09vVLeEjePGNi8I0WRCm1LyTnyyxYDflg9gqvaBN w==; X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="212622" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="212622" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 06:43:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="803721120" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="803721120" Received: from unknown (HELO jhogande-mobl1.fi.intel.com) ([10.237.66.43]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 06:43:50 -0800 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Date: Thu, 30 Nov 2023 16:43:34 +0200 Message-Id: <20231130144338.3083821-1-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v8 0/4] Prepare intel_fb for Xe X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Rodrigo Vivi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Intel fb creation is differing between Xe and i915 due to different implementations of backing object. This patch set is splitting i915 specific code into it's own source file. Similar source files will be introduced for Xe as well. Also use intel_bo_to_drm_bo instead of directly referring i915_gem_object->base. One i915_gem_object_put is changed to drm_gem_object_put. v8: - return original error code from intel_fb_bo_lookup_valid_bo on failure v7: - drop #include - s/user_mode_cmd/mode_cmd/ - Use passed i915 pointer instead of to_i915(obj->base.dev) v6: Add missing intel_fb_bo.[ch] v5: - Keep drm_any_plane_has_format check in intel_fb.c - Use mode_cmd instead of user_mode_cmd for intel_fb_bo_lookup_valid_bo - Use lookup_modifier_or_null in intel_fb_modifier_to_tiling and handle null value v4: Move drm_any_plane_has_format check into intel_fb_bo.c v3: Fix failure handling in intel_framebuffer_init v2: Couple of fixes to error value handling Cc: Rodrigo Vivi Cc: Maarten Lankhorst Cc: Jani Nikula Cc: Uma Shankar Jouni Högander (4): drm/i915/display: use intel_bo_to_drm_bo in intel_fb.c drm/i915/display: Convert intel_fb_modifier_to_tiling as non-static drm/i915/display: Handle invalid fb_modifier in intel_fb_modifier_to_tiling drm/i915/display: Split i915 specific code away from intel_fb.c drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_fb.c | 133 +++++++-------------- drivers/gpu/drm/i915/display/intel_fb.h | 2 + drivers/gpu/drm/i915/display/intel_fb_bo.c | 92 ++++++++++++++ drivers/gpu/drm/i915/display/intel_fb_bo.h | 24 ++++ 5 files changed, 164 insertions(+), 88 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_fb_bo.c create mode 100644 drivers/gpu/drm/i915/display/intel_fb_bo.h