From patchwork Thu May 27 22:03:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 448876 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp904120jac; Thu, 27 May 2021 15:03:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcqfxgtgzGYPkU54nuhf2hDr419wXTy2JCWajzH5BzW+jWg6WdJIgRYQwFyyYmUbmxFh6e X-Received: by 2002:a17:90a:7342:: with SMTP id j2mr772263pjs.10.1622153017240; Thu, 27 May 2021 15:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622153017; cv=none; d=google.com; s=arc-20160816; b=OqyJHwpLrpPidO4DebA4vmmWfJbCCc5hv/cbSrHifFIAlAaZHLC2oA/tL01XMMUqn0 a/Cc6Y9WrdLo3MHBncpP5DWc+KlvrvU5AE8TB1ktjkMbBBLYOYe8bb3sLmgm54vmaxQe 7f42t39uHN7IbJgIM+WjNHnw1TifmgkF60SOjvbvNACei6tiKNkQsfoF6lDBpDvlf1kg +M3mu/Tef1qJaDTAU/+eBP+YGfLPOHYN/Dt+rl75cLzEbE5SFiK1Y6JEqmilvev0kFCZ OiFZXueblpOsXJwe5XQwxISl5ruygK+O3LWgU/CKvAR7AW4VTY2SVMFtuik2PqPy4/eV JqaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=P2FMXmqOYVBO9+wFKj80xIXzCv9cq/mWbBoWznbYoVQ=; b=x7b6aIYwBKCaZQvbnN9OmidKNoccs8MKjjB2hEthFZ3yktVREafH+5ue2uG+8qJqAy sMlbguoWSHOdi+JrlFrpOzzax9/7sEWUH1wG1BozMCRg1FpsX5DKlDzlHXAf3IOmRx/K Ka7ZKxivuJDGsK0f6SYkKd+oDyuG5f5lApUXui6U08hu0T7bw7CkGr0Rdfc08luFbKvS k/ojvyDk6fPw6GA5b84nE3+EGX6jwc0Ha6HgdRB78QUyobqBM3hUEiO3BhF1zS4or12D Kor03L5bIohet2/DehZHVzWcnMySajUvk8DqWReQPFss6S6LJgF7xjkAs8V88wn1NlD9 IuZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Se4zlNj9; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id k29si4097409pgl.232.2021.05.27.15.03.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 15:03:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Se4zlNj9; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F5066E0F3; Thu, 27 May 2021 22:03:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8AADF6E0F3 for ; Thu, 27 May 2021 22:03:33 +0000 (UTC) Received: by mail-lf1-x130.google.com with SMTP id f30so2344364lfj.1 for ; Thu, 27 May 2021 15:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P2FMXmqOYVBO9+wFKj80xIXzCv9cq/mWbBoWznbYoVQ=; b=Se4zlNj9CjTtjHRXf23jz/kQmtFW2Sg9rXQ95SfIU/eLELFLvLu0FjEDsy8CZAUizo qeRxrWhVMCCjFRKGIc1oV6SoldDNhDnskD4QAOJTmQOreOSuBeu2Ml3jhrQuvAtbn5fW d5J8ln2kd+z7TmoGOcezG2KUidfV/z8JbC19Ngod6FQTZAb4pok+tEAtebggLOdb2P9e ekRv6FVuOt/enZirsxFgGi844F9ruuOTUzRhDqovxTVUVEYLh8Kb02Q5aOKILdR+rfqS G53qLzT2GQUtSim8o+t5hF9Klju2WvUX8DQJLsV+mQj1YrlXV45+qj4k8QYzwpIaTsBy DzoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P2FMXmqOYVBO9+wFKj80xIXzCv9cq/mWbBoWznbYoVQ=; b=rHW1noVoz/0xNDBPst7j26sAHFqGQwZyc8nk990yykdob7mcKVXHl+hbSQtbRoNgBH 5n5S3ABpRXmc+5bEWcqz6M+d917z5aDqI7huBKzx1g8mQBY9UHXzxTKCA/xjojJJ/DHA nJBBMilEi2jJrO0kFM1RBx6PZy+U+w0VZSe+HV1ObZvF2IEiiYOQ7wDWdU5cki2bnsNL +FD3e/d1IsLpiMpc7iBA+aeLKxNI8pQkG0EuGIgWJAt11TFuWKOF8XziGL6velNj/2ru B9lUJEHN+0cq3PvnVx9IM9pzcBcVIWfE9xjNuftKYHadW9cUwPjjeHhqi3illROj0nPH LNZg== X-Gm-Message-State: AOAM533IVurWmHMKZjdPHFN54RJnmu8H0XCzFP0V6W+LruR03dq2O1pM QLWJGCSPezlyqZCDdW6AVo7Eig== X-Received: by 2002:a05:6512:3c96:: with SMTP id h22mr3799949lfv.426.1622153011543; Thu, 27 May 2021 15:03:31 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id i25sm98403lfl.212.2021.05.27.15.03.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 15:03:31 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH] drm/msm: fix display snapshotting if DP or DSI is disabled Date: Fri, 28 May 2021 01:03:30 +0300 Message-Id: <20210527220330.3364716-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 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: kernel test robot , Jonathan Marek , Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fix following warnings generated when either DP or DSI support is disabled: drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c:141:3: error: implicit declaration of function 'msm_dp_snapshot'; did you mean 'msm_dsi_snapshot'? [-Werror=implicit-function-declaration] drivers/gpu/drm/msm/msm_kms.h:127:26: warning: 'struct msm_disp_state' declared inside parameter list will not be visible outside of this definition or declaration drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:867:21: error: initialization of 'void (*)(struct msm_disp_state *, struct msm_kms *)' from incompatible pointer type 'void (*)(struct msm_disp_state *, struct msm_kms *)' [-Werror=incompatible-pointer-types] drivers/gpu/drm/msm/dsi/dsi.h:94:30: warning: 'struct msm_disp_state' declared inside parameter list will not be visible outside of this definition or declaration Reported-by: kernel test robot Cc: Abhinav Kumar Fixes: 1c3b7ac1a71d ("drm/msm: pass dump state as a function argument") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/msm_disp_snapshot.h | 1 - drivers/gpu/drm/msm/dsi/dsi.h | 2 -- drivers/gpu/drm/msm/msm_drv.h | 12 +++++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) -- 2.30.2 Reviewed-by: Abhinav Kumar diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h index c6174a366095..c92a9508c8d3 100644 --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h @@ -27,7 +27,6 @@ #include #include #include "msm_kms.h" -#include "dsi.h" #define MSM_DISP_SNAPSHOT_MAX_BLKS 10 diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h index cea73f9c4be9..9b8e9b07eced 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.h +++ b/drivers/gpu/drm/msm/dsi/dsi.h @@ -91,8 +91,6 @@ static inline bool msm_dsi_device_connected(struct msm_dsi *msm_dsi) return msm_dsi->panel || msm_dsi->external_bridge; } -void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi); - struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi); /* dsi host */ diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index c33fc1293789..ba60bf6f124c 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -43,6 +43,7 @@ struct msm_gem_submit; struct msm_fence_context; struct msm_gem_address_space; struct msm_gem_vma; +struct msm_disp_state; #define MAX_CRTCS 8 #define MAX_PLANES 20 @@ -340,6 +341,8 @@ void __init msm_dsi_register(void); void __exit msm_dsi_unregister(void); int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, struct drm_encoder *encoder); +void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi); + #else static inline void __init msm_dsi_register(void) { @@ -353,6 +356,10 @@ static inline int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, { return -EINVAL; } +static inline void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi) +{ +} + #endif #ifdef CONFIG_DRM_MSM_DP @@ -367,7 +374,6 @@ void msm_dp_display_mode_set(struct msm_dp *dp, struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode); void msm_dp_irq_postinstall(struct msm_dp *dp_display); -struct msm_disp_state; void msm_dp_snapshot(struct msm_disp_state *disp_state, struct msm_dp *dp_display); void msm_dp_debugfs_init(struct msm_dp *dp_display, struct drm_minor *minor); @@ -412,6 +418,10 @@ static inline void msm_dp_irq_postinstall(struct msm_dp *dp_display) { } +static inline void msm_dp_snapshot(struct msm_disp_state *disp_state, struct msm_dp *dp_display) +{ +} + static inline void msm_dp_debugfs_init(struct msm_dp *dp_display, struct drm_minor *minor) {