From patchwork Thu Jul 26 20:30:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10546431 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 CA53C1805 for ; Thu, 26 Jul 2018 20:30:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D71622B800 for ; Thu, 26 Jul 2018 20:30:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB31E2B7DE; Thu, 26 Jul 2018 20:30:32 +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 3FAEE2B7DE for ; Thu, 26 Jul 2018 20:30:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 642356E849; Thu, 26 Jul 2018 20:30:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id A40AC6E843; Thu, 26 Jul 2018 20:30:21 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7A43C60BDD; Thu, 26 Jul 2018 20:30:21 +0000 (UTC) Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2DB196074D; Thu, 26 Jul 2018 20:30:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2DB196074D From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [PATCH 3/5] drm/msm/disp/dpu: Remove dpu_kms_utils Date: Thu, 26 Jul 2018 14:30:12 -0600 Message-Id: <20180726203014.3270-4-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726203014.3270-1-jcrouse@codeaurora.org> References: <20180726203014.3270-1-jcrouse@codeaurora.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP None of the functions in dpu_kms_utils.c seem to be used so remove them all. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 112 ------------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c | 153 ------------------ 3 files changed, 266 deletions(-) delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile index 1639ea8c0d13..7c773e003663 100644 --- a/drivers/gpu/drm/msm/Makefile +++ b/drivers/gpu/drm/msm/Makefile @@ -68,7 +68,6 @@ msm-y := \ disp/dpu1/dpu_io_util.o \ disp/dpu1/dpu_irq.o \ disp/dpu1/dpu_kms.o \ - disp/dpu1/dpu_kms_utils.o \ disp/dpu1/dpu_mdss.o \ disp/dpu1/dpu_plane.o \ disp/dpu1/dpu_power_handle.o \ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index 407c1ed27fe6..66d466628e2b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h @@ -270,118 +270,6 @@ void *dpu_debugfs_get_root(struct dpu_kms *dpu_kms); */ #define DPU_KMS_INFO_MAX_SIZE 4096 -/** - * struct dpu_kms_info - connector information structure container - * @data: Array of information character data - * @len: Current length of information data - * @staged_len: Temporary data buffer length, commit to - * len using dpu_kms_info_stop - * @start: Whether or not a partial data entry was just started - */ -struct dpu_kms_info { - char data[DPU_KMS_INFO_MAX_SIZE]; - uint32_t len; - uint32_t staged_len; - bool start; -}; - -/** - * DPU_KMS_INFO_DATA - Macro for accessing dpu_kms_info data bytes - * @S: Pointer to dpu_kms_info structure - * Returns: Pointer to byte data - */ -#define DPU_KMS_INFO_DATA(S) ((S) ? ((struct dpu_kms_info *)(S))->data : 0) - -/** - * DPU_KMS_INFO_DATALEN - Macro for accessing dpu_kms_info data length - * it adds an extra character length to count null. - * @S: Pointer to dpu_kms_info structure - * Returns: Size of available byte data - */ -#define DPU_KMS_INFO_DATALEN(S) ((S) ? ((struct dpu_kms_info *)(S))->len + 1 \ - : 0) - -/** - * dpu_kms_info_reset - reset dpu_kms_info structure - * @info: Pointer to dpu_kms_info structure - */ -void dpu_kms_info_reset(struct dpu_kms_info *info); - -/** - * dpu_kms_info_add_keyint - add integer value to 'dpu_kms_info' - * @info: Pointer to dpu_kms_info structure - * @key: Pointer to key string - * @value: Signed 64-bit integer value - */ -void dpu_kms_info_add_keyint(struct dpu_kms_info *info, - const char *key, - int64_t value); - -/** - * dpu_kms_info_add_keystr - add string value to 'dpu_kms_info' - * @info: Pointer to dpu_kms_info structure - * @key: Pointer to key string - * @value: Pointer to string value - */ -void dpu_kms_info_add_keystr(struct dpu_kms_info *info, - const char *key, - const char *value); - -/** - * dpu_kms_info_start - begin adding key to 'dpu_kms_info' - * Usage: - * dpu_kms_info_start(key) - * dpu_kms_info_append(val_1) - * ... - * dpu_kms_info_append(val_n) - * dpu_kms_info_stop - * @info: Pointer to dpu_kms_info structure - * @key: Pointer to key string - */ -void dpu_kms_info_start(struct dpu_kms_info *info, - const char *key); - -/** - * dpu_kms_info_append - append value string to 'dpu_kms_info' - * Usage: - * dpu_kms_info_start(key) - * dpu_kms_info_append(val_1) - * ... - * dpu_kms_info_append(val_n) - * dpu_kms_info_stop - * @info: Pointer to dpu_kms_info structure - * @str: Pointer to partial value string - */ -void dpu_kms_info_append(struct dpu_kms_info *info, - const char *str); - -/** - * dpu_kms_info_append_format - append format code string to 'dpu_kms_info' - * Usage: - * dpu_kms_info_start(key) - * dpu_kms_info_append_format(fourcc, modifier) - * ... - * dpu_kms_info_stop - * @info: Pointer to dpu_kms_info structure - * @pixel_format: FOURCC format code - * @modifier: 64-bit drm format modifier - */ -void dpu_kms_info_append_format(struct dpu_kms_info *info, - uint32_t pixel_format, - uint64_t modifier); - -/** - * dpu_kms_info_stop - finish adding key to 'dpu_kms_info' - * Usage: - * dpu_kms_info_start(key) - * dpu_kms_info_append(val_1) - * ... - * dpu_kms_info_append(val_n) - * dpu_kms_info_stop - * @info: Pointer to dpu_kms_info structure - */ -void dpu_kms_info_stop(struct dpu_kms_info *info); - /** * Vblank enable/disable functions */ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c deleted file mode 100644 index a80b3da5a9fe..000000000000 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#define pr_fmt(fmt) "dpu-kms_utils:[%s] " fmt, __func__ - -#include "dpu_kms.h" - -void dpu_kms_info_reset(struct dpu_kms_info *info) -{ - if (info) { - info->len = 0; - info->staged_len = 0; - } -} - -void dpu_kms_info_add_keyint(struct dpu_kms_info *info, - const char *key, - int64_t value) -{ - uint32_t len; - - if (info && key) { - len = snprintf(info->data + info->len, - DPU_KMS_INFO_MAX_SIZE - info->len, - "%s=%lld\n", - key, - value); - - /* check if snprintf truncated the string */ - if ((info->len + len) < DPU_KMS_INFO_MAX_SIZE) - info->len += len; - } -} - -void dpu_kms_info_add_keystr(struct dpu_kms_info *info, - const char *key, - const char *value) -{ - uint32_t len; - - if (info && key && value) { - len = snprintf(info->data + info->len, - DPU_KMS_INFO_MAX_SIZE - info->len, - "%s=%s\n", - key, - value); - - /* check if snprintf truncated the string */ - if ((info->len + len) < DPU_KMS_INFO_MAX_SIZE) - info->len += len; - } -} - -void dpu_kms_info_start(struct dpu_kms_info *info, - const char *key) -{ - uint32_t len; - - if (info && key) { - len = snprintf(info->data + info->len, - DPU_KMS_INFO_MAX_SIZE - info->len, - "%s=", - key); - - info->start = true; - - /* check if snprintf truncated the string */ - if ((info->len + len) < DPU_KMS_INFO_MAX_SIZE) - info->staged_len = info->len + len; - } -} - -void dpu_kms_info_append(struct dpu_kms_info *info, - const char *str) -{ - uint32_t len; - - if (info) { - len = snprintf(info->data + info->staged_len, - DPU_KMS_INFO_MAX_SIZE - info->staged_len, - "%s", - str); - - /* check if snprintf truncated the string */ - if ((info->staged_len + len) < DPU_KMS_INFO_MAX_SIZE) { - info->staged_len += len; - info->start = false; - } - } -} - -void dpu_kms_info_append_format(struct dpu_kms_info *info, - uint32_t pixel_format, - uint64_t modifier) -{ - uint32_t len; - - if (!info) - return; - - if (modifier) { - len = snprintf(info->data + info->staged_len, - DPU_KMS_INFO_MAX_SIZE - info->staged_len, - info->start ? - "%c%c%c%c/%llX/%llX" : " %c%c%c%c/%llX/%llX", - (pixel_format >> 0) & 0xFF, - (pixel_format >> 8) & 0xFF, - (pixel_format >> 16) & 0xFF, - (pixel_format >> 24) & 0xFF, - (modifier >> 56) & 0xFF, - modifier & ((1ULL << 56) - 1)); - } else { - len = snprintf(info->data + info->staged_len, - DPU_KMS_INFO_MAX_SIZE - info->staged_len, - info->start ? - "%c%c%c%c" : " %c%c%c%c", - (pixel_format >> 0) & 0xFF, - (pixel_format >> 8) & 0xFF, - (pixel_format >> 16) & 0xFF, - (pixel_format >> 24) & 0xFF); - } - - /* check if snprintf truncated the string */ - if ((info->staged_len + len) < DPU_KMS_INFO_MAX_SIZE) { - info->staged_len += len; - info->start = false; - } -} - -void dpu_kms_info_stop(struct dpu_kms_info *info) -{ - uint32_t len; - - if (info) { - /* insert final delimiter */ - len = snprintf(info->data + info->staged_len, - DPU_KMS_INFO_MAX_SIZE - info->staged_len, - "\n"); - - /* check if snprintf truncated the string */ - if ((info->staged_len + len) < DPU_KMS_INFO_MAX_SIZE) - info->len = info->staged_len + len; - } -}