From patchwork Tue Mar 28 08:32:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1762198 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=jDf+M1Zc; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pm2xx2rFvz1yYk for ; Tue, 28 Mar 2023 19:33:08 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ph4lC-00089A-1v; Tue, 28 Mar 2023 08:32:54 +0000 Received: from mail-pl1-f171.google.com ([209.85.214.171]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ph4lA-00088s-D0 for kernel-team@lists.ubuntu.com; Tue, 28 Mar 2023 08:32:52 +0000 Received: by mail-pl1-f171.google.com with SMTP id iw3so10947181plb.6 for ; Tue, 28 Mar 2023 01:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679992370; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=Rg6FbZa5HtZDb288+pz94S5mIt704dv2eTMgo9uHOYI=; b=jDf+M1ZcNzjttjwnn43AHw4ZpnwSBG1b53Ofi9lqHNs3iU6c2I6dbGtAdURuDrFQPW HrXG6M8okHj8PkOo0g0ivqtxceWEuPgLh7MpNmREkcsn/ATYx9la2yEQeRWE/RzCV3fX AJfZGMtnpJ5PIIb6q92C9ORwEw5Vv3c7FsfNJ0lV3Hjv876JFiL7AQ/eSEiqVekc+fne 1CJQMTgvcpDaGmKR0E3QRpd4rYJ/xeCnjf+eJt4n0GRC4KdlU+p6RblKOx+l9C0+0fFf s5CLHYlUWCa1A5pmdyVPWUczZg3CgGwURzMPvuZyxsh+NDnmyrdLN5LPZFWMkbfwancM hjVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679992370; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Rg6FbZa5HtZDb288+pz94S5mIt704dv2eTMgo9uHOYI=; b=sYuQMEjrPRZ8IHQKxNpDM0uQudn53d4bYAtdKrWaEis0IAc8ntLpV/Acjr6p58vlhT k8RCxuLRiwhavFcewctzF2e4+qu/F432n36mnEQAzkGLwGxk4f2CnPfVfvqE3SRBEdpZ rmZcl6I7wHklDMC6Z5FjNsdOazdO7NLTQbdzyVyjerS8Y1ZxpCQ+/FkrK5QbAu0e4a6/ GxrZkMowY+OcIAqVc/ewmhbl/vrq9rvUaIt/XDGEFN4Q6Z3Q2nm3pPnj9PRVsMgQhTlq X2eh3DaxOFbphgjRyVaxY1VPDmnv547zVTGx8UzAPhSWMsCs/twQ6ZoiOaBOI5bi//s5 0+GA== X-Gm-Message-State: AAQBX9fI5qOJHvVAgSRKVGoV0htkjLUXFQwieyJsoj/1/uZbBzaagdby XoDxxlCjAuq4er33GIg1CBLs1J7G1B1rWA== X-Google-Smtp-Source: AKy350aZ5EcfnOFFG2k/zfPDpqhuuYtzYqpXmDp1P5B1w9godx1hrIewBbtwAGu2re8mH0vzOKwfXw== X-Received: by 2002:a17:902:e548:b0:19c:f80c:df90 with SMTP id n8-20020a170902e54800b0019cf80cdf90mr17126399plf.45.1679992370164; Tue, 28 Mar 2023 01:32:50 -0700 (PDT) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id c4-20020a170902724400b001a1fe40a8dasm9825961pll.262.2023.03.28.01.32.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 01:32:49 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/9][SRU][L] drm/i915: Introduce intel_panel_init_alloc() Date: Tue, 28 Mar 2023 16:32:38 +0800 Message-Id: <20230328083246.366669-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230328083246.366669-1-acelan.kao@canonical.com> References: <20230328083246.366669-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.171; envelope-from=acelan@gmail.com; helo=mail-pl1-f171.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Ville Syrjälä BugLink: https://launchpad.net/bugs/2001599 Introduce a place where we can initialize connector->panel after it's been allocated. We already have a intel_panel_init() so had to get creative with the name and came up with intel_panel_init_alloc(). Cc: Animesh Manna Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-2-ville.syrjala@linux.intel.com (cherry picked from commit f70f8153e3642337b444fbc0c64d546a46bbcd62) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/gpu/drm/i915/display/intel_connector.c | 2 +- drivers/gpu/drm/i915/display/intel_panel.c | 7 +++++++ drivers/gpu/drm/i915/display/intel_panel.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_connector.c b/drivers/gpu/drm/i915/display/intel_connector.c index 6205ddd3ded0..562da3b741e2 100644 --- a/drivers/gpu/drm/i915/display/intel_connector.c +++ b/drivers/gpu/drm/i915/display/intel_connector.c @@ -54,7 +54,7 @@ int intel_connector_init(struct intel_connector *connector) __drm_atomic_helper_connector_reset(&connector->base, &conn_state->base); - INIT_LIST_HEAD(&connector->panel.fixed_modes); + intel_panel_init_alloc(connector); return 0; } diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c index 1640726bfbf6..b49228eb79e7 100644 --- a/drivers/gpu/drm/i915/display/intel_panel.c +++ b/drivers/gpu/drm/i915/display/intel_panel.c @@ -661,6 +661,13 @@ intel_panel_mode_valid(struct intel_connector *connector, return MODE_OK; } +void intel_panel_init_alloc(struct intel_connector *connector) +{ + struct intel_panel *panel = &connector->panel; + + INIT_LIST_HEAD(&panel->fixed_modes); +} + int intel_panel_init(struct intel_connector *connector) { struct intel_panel *panel = &connector->panel; diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h index 5c5b5b7f95b6..4b51e1c51da6 100644 --- a/drivers/gpu/drm/i915/display/intel_panel.h +++ b/drivers/gpu/drm/i915/display/intel_panel.h @@ -18,6 +18,7 @@ struct intel_connector; struct intel_crtc_state; struct intel_encoder; +void intel_panel_init_alloc(struct intel_connector *connector); int intel_panel_init(struct intel_connector *connector); void intel_panel_fini(struct intel_connector *connector); enum drm_connector_status