Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp58023pxb; Mon, 4 Apr 2022 23:55:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPLIDUazjxvIdKBdZyquN2ylnEYh3IBUqgj30nXLP+5ajbkiRuYgy3yZVIi/5TIc74MZSv X-Received: by 2002:a17:90b:3850:b0:1c6:572e:f39a with SMTP id nl16-20020a17090b385000b001c6572ef39amr2399518pjb.233.1649141702886; Mon, 04 Apr 2022 23:55:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649141702; cv=pass; d=google.com; s=arc-20160816; b=Oi2u8BiqCpFWjaJw/B+kUataKrKiRpZYOpDOv8boa7/YJEfWh5fj7qbAl8wSYR+dq3 uQQQ3Y1EaxIWPfK3vBW+8BKgpg+6z8vVEr5FmZQqg8vdugNGECk9HjZkqlzSIXeZNqEI saUC9hDWqgUutjHLj8keQsKK8ySf8c6wIPZsNEaPBMWRSXRE6tlkXrrmjMUNlMdXxzla Oo/VxziA6wMx/EzPc+vviQZaeFZva2J/tALH9RbxUaxLvGxT07qyHG8PDkh0Vk0xiq13 hu2x9/IG8E0YTh9SARfEAL2FMMoGsMBxkIfcOA67Zwxe4oivP5r6hlFJ5HnBOewbqf3e AhDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=JqN1wtyje2/x8RKIBTwm5Khri3jt8rCUj8LQxg8iF6s=; b=QHYDVHJIKIS8D9akqhlxTH38hwmDyiHDGguKcsQaqJzitKxYIhzmlTG6EGGbz0qoFU c7eDnh82c5Mpuj8LcQeFht3k2HW2va+SyIje/Xsn6R11DnslF+xaqCeb1gi5D/JKJmbX /rxjNn+9YfQg/M1Mm05yiZTtxw+7gGiX4YghYaWkaN3wSXft0aah+DqwnSQwPErDaB1v FZtHKY1HG8P3K5mcHez5fj8o4/+Wwx2gyA5ARxUuixmpKGQMuRAql3qo07PNJdEubxjD 7gpk0VVhj/lZ7OiZiCvt1JEIc0LPde2W1etr8kEBzxSWVmnZYQrAbE03b/meq+AHCQvV q1ag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=d+qccSYq; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a634616000000b003993a4f24desi3568543pga.441.2022.04.04.23.54.49; Mon, 04 Apr 2022 23:55:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=d+qccSYq; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230050AbiDEGGu (ORCPT + 99 others); Tue, 5 Apr 2022 02:06:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiDEGGs (ORCPT ); Tue, 5 Apr 2022 02:06:48 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2057.outbound.protection.outlook.com [40.107.223.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6D446407 for ; Mon, 4 Apr 2022 23:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M1Iffq7o1Rb08CeiU06azXt0Fag3aNaN4fKlOd84lWU/iNyBXJUE0b7I59SjYkMPgndoKTac9SLkEKjW+j42Sd++CYHebyfyVt7r0/dIbLPAZrZgT7waeYzpQR4aRhNMTCXTkQZzxrT5NIt73p63ADJmqpRcsuAHmR0dBE8QLq+1rfvO6/lis9RgoBs4Rx8FkNIukzcXO4lPeFptoK7WTmJod2W66wjoDeBgnSfke7GpEBunQrozqpyNdVlKGLgQpcBslYFF2omzkBVJJTp5q0/j9D8N996reE8YnQSmsjf5KE8GP3uBORzN/cgFLo7rYPs/mAAcDzo9+Ihio+4H7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JqN1wtyje2/x8RKIBTwm5Khri3jt8rCUj8LQxg8iF6s=; b=T1b5UoTXY/ZZpAKFZUMhmfMHAYPnKW+ahIfSAO7LJoGFFOgR9LgVaVNSwMBRub2hSjkG0su0m4qoCTgMZMixfl3ocs+dZFKuoOkUS5ZbHZGuuOd1j/kh/YQNNWXCY4NxbXWPJ8kprhG4+qUz/yB4ROdyKakaC7rsNbdh1NiqGYasGpvkfyI4/AUEqIE1A/N2ToTMolspElONIK/WzIEXSpnMp7lwbCJ2PvMEGM/IoI6tTh4rN7ie5ijTWkO3ZpUUfu0aEQnBwMzwOPEAiaR01rR51NIQOIJ8JNo1XTrArKENhNzD5hOzNblQqn3LMnI9J5iHufpui9OBIS1VeTKtpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JqN1wtyje2/x8RKIBTwm5Khri3jt8rCUj8LQxg8iF6s=; b=d+qccSYqllTRaeeoRsAuwKVQ9zodppaLH8VRqTBKzZueoIe8ZpXrAtoEDH2y0IbyTAt9fH2k4vttaG/CjiumkGlcOXUhBWB5uDlZTEoyNbvbUfcn3f7TRiL3A6ncPJWjVpdSgW92InAkvV5RnJqswcdZCKdgnZFiMy2ILUWm7cI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by BN6PR1201MB0001.namprd12.prod.outlook.com (2603:10b6:404:a7::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Tue, 5 Apr 2022 06:04:47 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::404f:1fc8:9f4c:f185]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::404f:1fc8:9f4c:f185%6]) with mapi id 15.20.5123.031; Tue, 5 Apr 2022 06:04:46 +0000 Message-ID: <65f33162-74ff-f205-aea9-3ed84dfddde1@amd.com> Date: Tue, 5 Apr 2022 08:04:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2] drm/radeon: change si_default_state table from global to static Content-Language: en-US To: Tom Rix , alexander.deucher@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch Cc: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: <20220404225710.972071-1-trix@redhat.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <20220404225710.972071-1-trix@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: AM6P191CA0096.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8a::37) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b6ce8cf1-5359-4531-a055-08da16ca2f45 X-MS-TrafficTypeDiagnostic: BN6PR1201MB0001:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JKBSprnxktN9HczHXzDGvJWSIDeMEZj0PM1q99StpmnlVJIZ4mAt1ZJF6WsjFWBjcJ7FYM40AimShBgL7st+9bxBwrhX66z9x84AQnhrQDoI8ZbuoMiReoGa6PyijCQBDHIboi4gk1AevIIJUtt2lBQA2TbQpT0uNLWnKyb7WYrWDpHtag6r9DCFF6G9wsDyg2jA/ldlR+As0uT+0hMX3C0wSuwLW6zMg48nzG7w6rbLRuRI+jXo6alM8B5BlJcwkUY83PW5Wabu1OUDgIPTbrjCl7mBKNXKyNBvSE0ReTFA8gOf2PjUI2X33pyHQDf5lZWK8IcXDu5LQ8jWyie1YCNgxWmW8f2jddrEjqdbw3tITt2Q+Z4ipQCo2nWCf5Ac9fA/vJBd1ut0VTU4KcDnpvi8b4YWZwy3G17M8+juJeE2CgXCxwDqfRLcT1mV8OFvcOJVUCNegSHOBj/n6nBw7p0NS9oOYf40XTBu9ykF2ROMbiCILas09XV3l92rT+18XfDfI6dnjtoRBtp0pxGAFYgdHuxxXhUZsBlChgNcSL+HGDdhiOO6LtnGSaA4U0rIxnKxnOovjwIv8xFk7lCYKPHhrZCyz9cTuEIkOQ0wkTZfVRon7rJk7Aq2I2/nEh58gLqy8lx/sWzdVbvsCJ5V57i5XQfIGKtlaAwwVJ4N4RYmCu9ikaiw5knimFG+JZoq8wiDUVSZNuTOwnZNp+nYdSqDs2QbMVFQ3uAU1J796cc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(4326008)(86362001)(31696002)(6666004)(2616005)(6512007)(316002)(6506007)(508600001)(6486002)(2906002)(66574015)(26005)(66556008)(66476007)(38100700002)(36756003)(8676002)(31686004)(8936002)(30864003)(83380400001)(5660300002)(66946007)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UFdwZWlxd3NDd3VIc09lUjVuZWZ6Vmk4aDV4Z0hObmcrT1l3eC8yc1dYZy85?= =?utf-8?B?VGNOUG1uWVN1YUNURTYyUkZvNTV0Nnl0UE56d213U3VveDdsdTMyVml6SUcv?= =?utf-8?B?UE9VRU1DSnJpWDJaMzRJQWVJbCs1QkRvVEJzQXQyMUxiQlZmMTZiNlRSOVRH?= =?utf-8?B?WTkyZlBSbkR1Q0dsblYxZ1Biak5KZzkzazcyYzN5L2lQeVhaMFN1VDJyRVRU?= =?utf-8?B?MXE1Ty95Nm1jMUcrTmZOYXBrdlJuRGFucUNuTlowSkdHenFDZ2VIQlZaZ0Nk?= =?utf-8?B?Y05oZHpNandTZnMvazlzOUEvVGRnbWVEMDJxbUVSNnFDQnBmM2t3V01PdndX?= =?utf-8?B?WVRJbGdBeTRaV1U1UDBaOEF4S09nS2N5UHRnUVNpZnJOQURwNC9SMkU4bWYx?= =?utf-8?B?K3RSRjd0V2lGaVRyT01zMkhwOUdNN3pkNWdINmpTSWtPZTg3WnJneG14aFNG?= =?utf-8?B?TE9LSHVKNHJQZE16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BqYTRP?= =?utf-8?B?V3F3ZXpOcHVWajdhelJudUhVRTVBRDc4ZXNNUW1zcHZqRjZrZWdLUT09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6ce8cf1-5359-4531-a055-08da16ca2f45 X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2022 06:04:45.9893 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gKFRmU2ituVMEid6NWvdmx6ohwt4qw1xj/Rj/7sAvyPJzEDYrhEgpge2qVa5dIqQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0001 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 05.04.22 um 00:57 schrieb Tom Rix: > Smatch reports these issues > si_blit_shaders.c:31:11: warning: symbol 'si_default_state' > was not declared. Should it be static? > si_blit_shaders.c:253:11: warning: symbol 'si_default_size' > was not declared. Should it be static? > > Both symbols are only used in si.c. Single file symbols > should be static. So move the definition of > si_default_state and si_default_size to si_blit_shader.h > and change their storage-class-specifier to static. > > Remove unneeded si_blit_shader.c > > Signed-off-by: Tom Rix Reviewed-by: Christian König > --- > v2: move definitions to header > > drivers/gpu/drm/radeon/Makefile | 2 +- > drivers/gpu/drm/radeon/si_blit_shaders.c | 253 ----------------------- > drivers/gpu/drm/radeon/si_blit_shaders.h | 223 +++++++++++++++++++- > 3 files changed, 222 insertions(+), 256 deletions(-) > delete mode 100644 drivers/gpu/drm/radeon/si_blit_shaders.c > > diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile > index 11c97edde54d..664381f4eb07 100644 > --- a/drivers/gpu/drm/radeon/Makefile > +++ b/drivers/gpu/drm/radeon/Makefile > @@ -44,7 +44,7 @@ radeon-y += radeon_device.o radeon_asic.o radeon_kms.o \ > evergreen.o evergreen_cs.o evergreen_blit_shaders.o \ > evergreen_hdmi.o radeon_trace_points.o ni.o cayman_blit_shaders.o \ > atombios_encoders.o radeon_semaphore.o radeon_sa.o atombios_i2c.o si.o \ > - si_blit_shaders.o radeon_prime.o cik.o cik_blit_shaders.o \ > + radeon_prime.o cik.o cik_blit_shaders.o \ > r600_dpm.o rs780_dpm.o rv6xx_dpm.o rv770_dpm.o rv730_dpm.o rv740_dpm.o \ > rv770_smc.o cypress_dpm.o btc_dpm.o sumo_dpm.o sumo_smc.o trinity_dpm.o \ > trinity_smc.o ni_dpm.o si_smc.o si_dpm.o kv_smc.o kv_dpm.o ci_smc.o \ > diff --git a/drivers/gpu/drm/radeon/si_blit_shaders.c b/drivers/gpu/drm/radeon/si_blit_shaders.c > deleted file mode 100644 > index ec415e7dfa4b..000000000000 > --- a/drivers/gpu/drm/radeon/si_blit_shaders.c > +++ /dev/null > @@ -1,253 +0,0 @@ > -/* > - * Copyright 2011 Advanced Micro Devices, Inc. > - * > - * Permission is hereby granted, free of charge, to any person obtaining a > - * copy of this software and associated documentation files (the "Software"), > - * to deal in the Software without restriction, including without limitation > - * the rights to use, copy, modify, merge, publish, distribute, sublicense, > - * and/or sell copies of the Software, and to permit persons to whom the > - * Software is furnished to do so, subject to the following conditions: > - * > - * The above copyright notice and this permission notice (including the next > - * paragraph) shall be included in all copies or substantial portions of the > - * Software. > - * > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > - * THE COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > - * DEALINGS IN THE SOFTWARE. > - * > - * Authors: > - * Alex Deucher > - */ > - > -#include > -#include > -#include > - > -const u32 si_default_state[] = > -{ > - 0xc0066900, > - 0x00000000, > - 0x00000060, /* DB_RENDER_CONTROL */ > - 0x00000000, /* DB_COUNT_CONTROL */ > - 0x00000000, /* DB_DEPTH_VIEW */ > - 0x0000002a, /* DB_RENDER_OVERRIDE */ > - 0x00000000, /* DB_RENDER_OVERRIDE2 */ > - 0x00000000, /* DB_HTILE_DATA_BASE */ > - > - 0xc0046900, > - 0x00000008, > - 0x00000000, /* DB_DEPTH_BOUNDS_MIN */ > - 0x00000000, /* DB_DEPTH_BOUNDS_MAX */ > - 0x00000000, /* DB_STENCIL_CLEAR */ > - 0x00000000, /* DB_DEPTH_CLEAR */ > - > - 0xc0036900, > - 0x0000000f, > - 0x00000000, /* DB_DEPTH_INFO */ > - 0x00000000, /* DB_Z_INFO */ > - 0x00000000, /* DB_STENCIL_INFO */ > - > - 0xc0016900, > - 0x00000080, > - 0x00000000, /* PA_SC_WINDOW_OFFSET */ > - > - 0xc00d6900, > - 0x00000083, > - 0x0000ffff, /* PA_SC_CLIPRECT_RULE */ > - 0x00000000, /* PA_SC_CLIPRECT_0_TL */ > - 0x20002000, /* PA_SC_CLIPRECT_0_BR */ > - 0x00000000, > - 0x20002000, > - 0x00000000, > - 0x20002000, > - 0x00000000, > - 0x20002000, > - 0xaaaaaaaa, /* PA_SC_EDGERULE */ > - 0x00000000, /* PA_SU_HARDWARE_SCREEN_OFFSET */ > - 0x0000000f, /* CB_TARGET_MASK */ > - 0x0000000f, /* CB_SHADER_MASK */ > - > - 0xc0226900, > - 0x00000094, > - 0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */ > - 0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */ > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x80000000, > - 0x20002000, > - 0x00000000, /* PA_SC_VPORT_ZMIN_0 */ > - 0x3f800000, /* PA_SC_VPORT_ZMAX_0 */ > - > - 0xc0026900, > - 0x000000d9, > - 0x00000000, /* CP_RINGID */ > - 0x00000000, /* CP_VMID */ > - > - 0xc0046900, > - 0x00000100, > - 0xffffffff, /* VGT_MAX_VTX_INDX */ > - 0x00000000, /* VGT_MIN_VTX_INDX */ > - 0x00000000, /* VGT_INDX_OFFSET */ > - 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */ > - > - 0xc0046900, > - 0x00000105, > - 0x00000000, /* CB_BLEND_RED */ > - 0x00000000, /* CB_BLEND_GREEN */ > - 0x00000000, /* CB_BLEND_BLUE */ > - 0x00000000, /* CB_BLEND_ALPHA */ > - > - 0xc0016900, > - 0x000001e0, > - 0x00000000, /* CB_BLEND0_CONTROL */ > - > - 0xc00e6900, > - 0x00000200, > - 0x00000000, /* DB_DEPTH_CONTROL */ > - 0x00000000, /* DB_EQAA */ > - 0x00cc0010, /* CB_COLOR_CONTROL */ > - 0x00000210, /* DB_SHADER_CONTROL */ > - 0x00010000, /* PA_CL_CLIP_CNTL */ > - 0x00000004, /* PA_SU_SC_MODE_CNTL */ > - 0x00000100, /* PA_CL_VTE_CNTL */ > - 0x00000000, /* PA_CL_VS_OUT_CNTL */ > - 0x00000000, /* PA_CL_NANINF_CNTL */ > - 0x00000000, /* PA_SU_LINE_STIPPLE_CNTL */ > - 0x00000000, /* PA_SU_LINE_STIPPLE_SCALE */ > - 0x00000000, /* PA_SU_PRIM_FILTER_CNTL */ > - 0x00000000, /* */ > - 0x00000000, /* */ > - > - 0xc0116900, > - 0x00000280, > - 0x00000000, /* PA_SU_POINT_SIZE */ > - 0x00000000, /* PA_SU_POINT_MINMAX */ > - 0x00000008, /* PA_SU_LINE_CNTL */ > - 0x00000000, /* PA_SC_LINE_STIPPLE */ > - 0x00000000, /* VGT_OUTPUT_PATH_CNTL */ > - 0x00000000, /* VGT_HOS_CNTL */ > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, /* VGT_GS_MODE */ > - > - 0xc0026900, > - 0x00000292, > - 0x00000000, /* PA_SC_MODE_CNTL_0 */ > - 0x00000000, /* PA_SC_MODE_CNTL_1 */ > - > - 0xc0016900, > - 0x000002a1, > - 0x00000000, /* VGT_PRIMITIVEID_EN */ > - > - 0xc0016900, > - 0x000002a5, > - 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_EN */ > - > - 0xc0026900, > - 0x000002a8, > - 0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */ > - 0x00000000, > - > - 0xc0026900, > - 0x000002ad, > - 0x00000000, /* VGT_REUSE_OFF */ > - 0x00000000, > - > - 0xc0016900, > - 0x000002d5, > - 0x00000000, /* VGT_SHADER_STAGES_EN */ > - > - 0xc0016900, > - 0x000002dc, > - 0x0000aa00, /* DB_ALPHA_TO_MASK */ > - > - 0xc0066900, > - 0x000002de, > - 0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */ > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - > - 0xc0026900, > - 0x000002e5, > - 0x00000000, /* VGT_STRMOUT_CONFIG */ > - 0x00000000, > - > - 0xc01b6900, > - 0x000002f5, > - 0x76543210, /* PA_SC_CENTROID_PRIORITY_0 */ > - 0xfedcba98, /* PA_SC_CENTROID_PRIORITY_1 */ > - 0x00000000, /* PA_SC_LINE_CNTL */ > - 0x00000000, /* PA_SC_AA_CONFIG */ > - 0x00000005, /* PA_SU_VTX_CNTL */ > - 0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */ > - 0x3f800000, /* PA_CL_GB_VERT_DISC_ADJ */ > - 0x3f800000, /* PA_CL_GB_HORZ_CLIP_ADJ */ > - 0x3f800000, /* PA_CL_GB_HORZ_DISC_ADJ */ > - 0x00000000, /* PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 */ > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0x00000000, > - 0xffffffff, /* PA_SC_AA_MASK_X0Y0_X1Y0 */ > - 0xffffffff, > - > - 0xc0026900, > - 0x00000316, > - 0x0000000e, /* VGT_VERTEX_REUSE_BLOCK_CNTL */ > - 0x00000010, /* */ > -}; > - > -const u32 si_default_size = ARRAY_SIZE(si_default_state); > diff --git a/drivers/gpu/drm/radeon/si_blit_shaders.h b/drivers/gpu/drm/radeon/si_blit_shaders.h > index c739e51e3961..829a2b6228b7 100644 > --- a/drivers/gpu/drm/radeon/si_blit_shaders.h > +++ b/drivers/gpu/drm/radeon/si_blit_shaders.h > @@ -25,8 +25,227 @@ > #ifndef SI_BLIT_SHADERS_H > #define SI_BLIT_SHADERS_H > > -extern const u32 si_default_state[]; > +static const u32 si_default_state[] = { > + 0xc0066900, > + 0x00000000, > + 0x00000060, /* DB_RENDER_CONTROL */ > + 0x00000000, /* DB_COUNT_CONTROL */ > + 0x00000000, /* DB_DEPTH_VIEW */ > + 0x0000002a, /* DB_RENDER_OVERRIDE */ > + 0x00000000, /* DB_RENDER_OVERRIDE2 */ > + 0x00000000, /* DB_HTILE_DATA_BASE */ > > -extern const u32 si_default_size; > + 0xc0046900, > + 0x00000008, > + 0x00000000, /* DB_DEPTH_BOUNDS_MIN */ > + 0x00000000, /* DB_DEPTH_BOUNDS_MAX */ > + 0x00000000, /* DB_STENCIL_CLEAR */ > + 0x00000000, /* DB_DEPTH_CLEAR */ > + > + 0xc0036900, > + 0x0000000f, > + 0x00000000, /* DB_DEPTH_INFO */ > + 0x00000000, /* DB_Z_INFO */ > + 0x00000000, /* DB_STENCIL_INFO */ > + > + 0xc0016900, > + 0x00000080, > + 0x00000000, /* PA_SC_WINDOW_OFFSET */ > + > + 0xc00d6900, > + 0x00000083, > + 0x0000ffff, /* PA_SC_CLIPRECT_RULE */ > + 0x00000000, /* PA_SC_CLIPRECT_0_TL */ > + 0x20002000, /* PA_SC_CLIPRECT_0_BR */ > + 0x00000000, > + 0x20002000, > + 0x00000000, > + 0x20002000, > + 0x00000000, > + 0x20002000, > + 0xaaaaaaaa, /* PA_SC_EDGERULE */ > + 0x00000000, /* PA_SU_HARDWARE_SCREEN_OFFSET */ > + 0x0000000f, /* CB_TARGET_MASK */ > + 0x0000000f, /* CB_SHADER_MASK */ > + > + 0xc0226900, > + 0x00000094, > + 0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */ > + 0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */ > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x80000000, > + 0x20002000, > + 0x00000000, /* PA_SC_VPORT_ZMIN_0 */ > + 0x3f800000, /* PA_SC_VPORT_ZMAX_0 */ > + > + 0xc0026900, > + 0x000000d9, > + 0x00000000, /* CP_RINGID */ > + 0x00000000, /* CP_VMID */ > + > + 0xc0046900, > + 0x00000100, > + 0xffffffff, /* VGT_MAX_VTX_INDX */ > + 0x00000000, /* VGT_MIN_VTX_INDX */ > + 0x00000000, /* VGT_INDX_OFFSET */ > + 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */ > + > + 0xc0046900, > + 0x00000105, > + 0x00000000, /* CB_BLEND_RED */ > + 0x00000000, /* CB_BLEND_GREEN */ > + 0x00000000, /* CB_BLEND_BLUE */ > + 0x00000000, /* CB_BLEND_ALPHA */ > + > + 0xc0016900, > + 0x000001e0, > + 0x00000000, /* CB_BLEND0_CONTROL */ > + > + 0xc00e6900, > + 0x00000200, > + 0x00000000, /* DB_DEPTH_CONTROL */ > + 0x00000000, /* DB_EQAA */ > + 0x00cc0010, /* CB_COLOR_CONTROL */ > + 0x00000210, /* DB_SHADER_CONTROL */ > + 0x00010000, /* PA_CL_CLIP_CNTL */ > + 0x00000004, /* PA_SU_SC_MODE_CNTL */ > + 0x00000100, /* PA_CL_VTE_CNTL */ > + 0x00000000, /* PA_CL_VS_OUT_CNTL */ > + 0x00000000, /* PA_CL_NANINF_CNTL */ > + 0x00000000, /* PA_SU_LINE_STIPPLE_CNTL */ > + 0x00000000, /* PA_SU_LINE_STIPPLE_SCALE */ > + 0x00000000, /* PA_SU_PRIM_FILTER_CNTL */ > + 0x00000000, /* */ > + 0x00000000, /* */ > + > + 0xc0116900, > + 0x00000280, > + 0x00000000, /* PA_SU_POINT_SIZE */ > + 0x00000000, /* PA_SU_POINT_MINMAX */ > + 0x00000008, /* PA_SU_LINE_CNTL */ > + 0x00000000, /* PA_SC_LINE_STIPPLE */ > + 0x00000000, /* VGT_OUTPUT_PATH_CNTL */ > + 0x00000000, /* VGT_HOS_CNTL */ > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, /* VGT_GS_MODE */ > + > + 0xc0026900, > + 0x00000292, > + 0x00000000, /* PA_SC_MODE_CNTL_0 */ > + 0x00000000, /* PA_SC_MODE_CNTL_1 */ > + > + 0xc0016900, > + 0x000002a1, > + 0x00000000, /* VGT_PRIMITIVEID_EN */ > + > + 0xc0016900, > + 0x000002a5, > + 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_EN */ > + > + 0xc0026900, > + 0x000002a8, > + 0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */ > + 0x00000000, > + > + 0xc0026900, > + 0x000002ad, > + 0x00000000, /* VGT_REUSE_OFF */ > + 0x00000000, > + > + 0xc0016900, > + 0x000002d5, > + 0x00000000, /* VGT_SHADER_STAGES_EN */ > + > + 0xc0016900, > + 0x000002dc, > + 0x0000aa00, /* DB_ALPHA_TO_MASK */ > + > + 0xc0066900, > + 0x000002de, > + 0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */ > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + > + 0xc0026900, > + 0x000002e5, > + 0x00000000, /* VGT_STRMOUT_CONFIG */ > + 0x00000000, > + > + 0xc01b6900, > + 0x000002f5, > + 0x76543210, /* PA_SC_CENTROID_PRIORITY_0 */ > + 0xfedcba98, /* PA_SC_CENTROID_PRIORITY_1 */ > + 0x00000000, /* PA_SC_LINE_CNTL */ > + 0x00000000, /* PA_SC_AA_CONFIG */ > + 0x00000005, /* PA_SU_VTX_CNTL */ > + 0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */ > + 0x3f800000, /* PA_CL_GB_VERT_DISC_ADJ */ > + 0x3f800000, /* PA_CL_GB_HORZ_CLIP_ADJ */ > + 0x3f800000, /* PA_CL_GB_HORZ_DISC_ADJ */ > + 0x00000000, /* PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 */ > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0x00000000, > + 0xffffffff, /* PA_SC_AA_MASK_X0Y0_X1Y0 */ > + 0xffffffff, > + > + 0xc0026900, > + 0x00000316, > + 0x0000000e, /* VGT_VERTEX_REUSE_BLOCK_CNTL */ > + 0x00000010, /* */ > +}; > + > +static const u32 si_default_size = ARRAY_SIZE(si_default_state); > > #endif