From patchwork Tue Aug 4 20:06:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 11701495 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 14F7D14DD for ; Wed, 5 Aug 2020 07:14:06 +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 EC8E021744 for ; Wed, 5 Aug 2020 07:14:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ouoh3vaN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC8E021744 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 28EB76E529; Wed, 5 Aug 2020 07:13:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4B2FB89E52; Tue, 4 Aug 2020 20:07:09 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id w14so15192377ljj.4; Tue, 04 Aug 2020 13:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8X1vD9iMjbD58TZPHKwb4ye5PBWIjmiaZvRTOJ3otNU=; b=Ouoh3vaNcVVGD7H1kVwnvrVgU+wwepgvDoAEKRlV+AQ4Tf2O+YsRYKYjqgvyFNQB2o eROYCzwN/1rJZ+FMCt2vFYPMrt4X0Rmk9LoreTDEZAGNnFKT6V2YRSqWNc14awRYiFn7 jEUkw6GM3xGAEjf3AXKOIgEMI3vjKawi3ItOG4+6Jl80xw80/Alin70MWgu/wjlM7d94 c3jshDgkCYxxIq7vcFA18eAH30zhEryIJTkQW4bINYC9f/+SEEdxx8P4ZJ1UiSuqHgJU gVywg7cQU1OOxLn4t8RJCuKJx36zrpwywX8nIm3XL/Rs3oOwMK2kM33iP3Lm8D1toPPn YBQA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8X1vD9iMjbD58TZPHKwb4ye5PBWIjmiaZvRTOJ3otNU=; b=QHEC44kTRgfJ7HYrdzKJhJ8CQtFfl5QmIdjNqei6hDOkanC575fLyzVz5OHnfWRJPt XUvOQzdi0MbFhiAQs0WLsst1LNOtW4MuysGDA2oQ3C+k019RjGEzY7f3NJpgeKRCgtAC u2piB+YkQbXHCxw4cl5leHJ6YKx4hdv4XV5v4K4xYAIITKZ1RMa+rEem8aXPP7R9K+0p Wx5d7j+SnzCYsxlkpLeAua7OFnJFVCnNbpI137b59E5a/ohTT9yY6mat7omOK0lOiL1B jbcYf/a2yjIcl2ryJaE+J5mqZWJ8MJqmsi11GlKZ9DZUNK99bODdqfYc4x7mgmqzxJVl ByZw== X-Gm-Message-State: AOAM532rrX+IygayrZ4nEV8Q9pYzxkx+eWGJKiaeSMRRSNofxF02/uGE dJbVbVLL+GFcQY6x69XYysE= X-Google-Smtp-Source: ABdhPJx1Y3+zg8EQVx5eowP9zlLeEH4mmso+i3MTOfkpYRGj2nf76AZey+5T5A6YD2go2MiFTnmiCg== X-Received: by 2002:a2e:a179:: with SMTP id u25mr11596380ljl.101.1596571626718; Tue, 04 Aug 2020 13:07:06 -0700 (PDT) Received: from localhost.localdomain (h-82-196-111-59.NA.cust.bahnhof.se. [82.196.111.59]) by smtp.gmail.com with ESMTPSA id g21sm3080020ljh.103.2020.08.04.13.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2020 13:07:06 -0700 (PDT) From: Rikard Falkeborn To: harry.wentland@amd.com, sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com Subject: [PATCH 1/3] drm/amd/display: Constify dcn20_res_pool_funcs Date: Tue, 4 Aug 2020 22:06:53 +0200 Message-Id: <20200804200655.30495-2-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200804200655.30495-1-rikard.falkeborn@gmail.com> References: <20200804200655.30495-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 05 Aug 2020 07:13:16 +0000 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: amd-gfx@lists.freedesktop.org, airlied@linux.ie, linux-kernel@vger.kernel.org, Rikard Falkeborn , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The only usage of dcn20_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 2a5e7175926a..d7ce984a2ce3 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -3320,7 +3320,7 @@ enum dc_status dcn20_patch_unknown_plane_state(struct dc_plane_state *plane_stat return DC_OK; } -static struct resource_funcs dcn20_res_pool_funcs = { +static const struct resource_funcs dcn20_res_pool_funcs = { .destroy = dcn20_destroy_resource_pool, .link_enc_create = dcn20_link_encoder_create, .panel_cntl_create = dcn20_panel_cntl_create, From patchwork Tue Aug 4 20:06:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 11701475 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 74ED01392 for ; Wed, 5 Aug 2020 07:13:47 +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 58C6F21744 for ; Wed, 5 Aug 2020 07:13:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FLpZxQ4G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58C6F21744 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 E33096E519; Wed, 5 Aug 2020 07:13:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 76A4889E52; Tue, 4 Aug 2020 20:07:09 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id g6so32395060ljn.11; Tue, 04 Aug 2020 13:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QwuLYaLApEmOVHWHp+Vw1bu5HTkIwR1S8vZ0IWZKqmM=; b=FLpZxQ4GTpNyh/1BXqukhZgZoy6iGrA7zQp+owRl9101bQaeprmsdtxy3eVIVuNFCQ AQ1Bkycg1e8d/wStglObx5UZLQmRmyAGbwikAijd+WWViYbgFdUnvZf4hWoZeAoG0Lu9 Hsg1dG1Fno2GINrLJQI/JQiW/LLdUAVRBN5E57dqRbjPFWnUgaRf6Gf9L0FU/VTDOXMo Q2xp90uVLmWip7UK3nvWlrgW4d+oFC/d87YsaLPcEcU74EzQi0wa39YUIu/p7HiLXAWp hbHBiRjl95a86OgI1DHtLJByW+Tg63iS16OT+gfg6HMyUogie2MaGCLjUziIX0GzanYI mFLg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=QwuLYaLApEmOVHWHp+Vw1bu5HTkIwR1S8vZ0IWZKqmM=; b=sX5j43gpTzlg/d0Xe2oo+FhtwLe6H43Gj/dUsiFPotWkaVSh9OynRMtbL9GrxkGcFd /WnKt7gujTj2aJZerLt7+xETByku4LJy95cjos9VWfZtx/z9ARw/VDY5TcQVAD5WyNKJ KyCnFc9K+/IvvJiTZW4xG2i2XokbfpSROyjPaQLXs6OzRDM0n6/lmc6DpJ8iaVRUsmhS xK4VGzs4U5b7Doba/iB20RUyKgk/scL3d3Rm0F+jtEUHv92eVclXARDWonBwBgsK8//H 8fi5Ii/DQBop987djTOiS+Q8TpU9n1RWpriMG5fjg+ajfSzsa47YFk4rwz9S5IiqXSgh yIYQ== X-Gm-Message-State: AOAM530apL2QB8Wgt/7HGWeumxAPgvfIsL6Ta749/Xw1+070msb3/OHG bcEu0hSmPG4n5j8h8HUoaDY= X-Google-Smtp-Source: ABdhPJy10VXgAk8Goc18zm0EgsOvZ6ttd08uapq9UzSlkSY6+d275kuzohjkFRZy0NKuyd896rLEMw== X-Received: by 2002:a2e:8e96:: with SMTP id z22mr9619710ljk.462.1596571627893; Tue, 04 Aug 2020 13:07:07 -0700 (PDT) Received: from localhost.localdomain (h-82-196-111-59.NA.cust.bahnhof.se. [82.196.111.59]) by smtp.gmail.com with ESMTPSA id g21sm3080020ljh.103.2020.08.04.13.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2020 13:07:07 -0700 (PDT) From: Rikard Falkeborn To: harry.wentland@amd.com, sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com Subject: [PATCH 2/3] drm/amd/display: Constify dcn21_res_pool_funcs Date: Tue, 4 Aug 2020 22:06:54 +0200 Message-Id: <20200804200655.30495-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200804200655.30495-1-rikard.falkeborn@gmail.com> References: <20200804200655.30495-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 05 Aug 2020 07:13:16 +0000 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: amd-gfx@lists.freedesktop.org, airlied@linux.ie, linux-kernel@vger.kernel.org, Rikard Falkeborn , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The only usage of dcn21_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c index 88d41a385add..a828696668bf 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c @@ -1754,7 +1754,7 @@ enum dc_status dcn21_patch_unknown_plane_state(struct dc_plane_state *plane_stat return result; } -static struct resource_funcs dcn21_res_pool_funcs = { +static const struct resource_funcs dcn21_res_pool_funcs = { .destroy = dcn21_destroy_resource_pool, .link_enc_create = dcn21_link_encoder_create, .panel_cntl_create = dcn21_panel_cntl_create, From patchwork Tue Aug 4 20:06:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 11701477 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 AD2171392 for ; Wed, 5 Aug 2020 07:13:48 +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 90B5F21744 for ; Wed, 5 Aug 2020 07:13:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s9xx/Duk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90B5F21744 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 285376E50D; Wed, 5 Aug 2020 07:13:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id B72876E4B6; Tue, 4 Aug 2020 20:07:10 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id w14so15192452ljj.4; Tue, 04 Aug 2020 13:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u8vVd3eNYQguySxvKcCaV5W8ooNVhtOP1CKm/UC6A7I=; b=s9xx/Duk98DAB0+L8vFJMaT7WWygK0TAVyP8WfoNoaFx3f2OxDMsQm34eFo1UqG5Xr d9dpxhegHqwtwtW6evsWeDD9utm7jF5dneGl3JlS/3ERywgRsNOPa5o0gke2M+69aSwY O9wZPw8E8PiOT0Mo3LmYhFOdJvbUlxHqUTdcU3XwO1/LAH8DVBMbxlw8SIkK30Hdz+Za KXs8UGhnHkIcTbM9q/sVxhDjpXK/r1vgmHsLL3AO8VYtuijNNqWECRksnrVnZ4x/i53X KoS7hM2sZgmiDw2nxwUeo6qssL0XXACOrQKM150LTEUabBJ/VC+boW6XHPfAwM/xQEZR mtDQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=u8vVd3eNYQguySxvKcCaV5W8ooNVhtOP1CKm/UC6A7I=; b=HyC9r/V3OFBAQFQQs0UvwGVS0iOnbZwL4cInkPV4nnIRnEROg2ClUftCjlRKedW61e iHfv9sjJEFOMgLLrN3Bd/PdYLBQd1RC1hTg4NgR5Gtqy+Kgdyk7mwokKa5uMIjOx95o1 VCkBNrfFTrn4SxRqiXv0DeF6Ow8pD7POIovTKyQTjrr1vP6d0qx3OcMdUuzfKz8lIJej KP4dZ5s/ZQP6U2kzlGUTycqzF+Lq+859AxewaM3LDSHopAhNU37S4E4UO9b+oojVxeKT NemOLxmM7Y14IHW4SKsttt+bM4xvwsGBqZoEkIr0ucFcZHyCeQZYONzw2nvn3nm6iJzA z2nQ== X-Gm-Message-State: AOAM533qwFV4ReUJw+DeGci6J2s0nIAwFooQ4og6CSh3B6knnwCcQXBn wcXjEB5ZY0QHFdkptimHduk= X-Google-Smtp-Source: ABdhPJyBRrbSBhdu9xngj5VBMCOa3dus0RevnDqkrLCpPxaq4pkyHzKmzy8Eur5swB9DFOpFQqCLPg== X-Received: by 2002:a05:651c:c6:: with SMTP id 6mr10769338ljr.237.1596571629160; Tue, 04 Aug 2020 13:07:09 -0700 (PDT) Received: from localhost.localdomain (h-82-196-111-59.NA.cust.bahnhof.se. [82.196.111.59]) by smtp.gmail.com with ESMTPSA id g21sm3080020ljh.103.2020.08.04.13.07.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2020 13:07:08 -0700 (PDT) From: Rikard Falkeborn To: harry.wentland@amd.com, sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com Subject: [PATCH 3/3] drm/amd/display: Constify dcn30_res_pool_funcs Date: Tue, 4 Aug 2020 22:06:55 +0200 Message-Id: <20200804200655.30495-4-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200804200655.30495-1-rikard.falkeborn@gmail.com> References: <20200804200655.30495-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 05 Aug 2020 07:13:16 +0000 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: amd-gfx@lists.freedesktop.org, airlied@linux.ie, linux-kernel@vger.kernel.org, Rikard Falkeborn , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The only usage of dcn30_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c index 653a571e366d..d474a6188445 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c @@ -2412,7 +2412,7 @@ static void dcn30_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw dml_init_instance(&dc->current_state->bw_ctx.dml, &dcn3_0_soc, &dcn3_0_ip, DML_PROJECT_DCN30); } -static struct resource_funcs dcn30_res_pool_funcs = { +static const struct resource_funcs dcn30_res_pool_funcs = { .destroy = dcn30_destroy_resource_pool, .link_enc_create = dcn30_link_encoder_create, .panel_cntl_create = dcn30_panel_cntl_create,