From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4508DC43334 for ; Mon, 18 Jul 2022 09:27:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 78B6B6B0071; Mon, 18 Jul 2022 05:27:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 73A2B6B0072; Mon, 18 Jul 2022 05:27:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 601638E0001; Mon, 18 Jul 2022 05:27:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4D6B66B0071 for ; Mon, 18 Jul 2022 05:27:37 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 06DE720DF2 for ; Mon, 18 Jul 2022 09:27:37 +0000 (UTC) X-FDA: 79699692954.12.67C4DD0 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf31.hostedemail.com (Postfix) with ESMTP id D61BB20009 for ; Mon, 18 Jul 2022 09:27:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658136455; x=1689672455; h=date:from:to:cc:subject:message-id:mime-version; bh=+8oUGTvC2bi0GFw9B4TVDESKXD0KmbsffKMr/TSBUTk=; b=WawVeLv2JoUMEaDLomPEy34YzdzmEuaqFrWor34Gpxeh1rD3qI1RLMMM jE2u84J5yGmU0WOsCVl5ECvvluHF7WzSVC2ZtYtpsqvZl6FhGdwZGfcR6 eX9N7DXJRYVKlhMNXgRS8/b8KxehefhPhFeWBc9SiG71ubK53J/pVqAIo Ni6b0WCdQRYcOo7WWQZkedAjIMxfh8aK07PmNWAZR1VGD8hP4jvHYi2bj +XNJKMyW8npOks7rY88qPfQ41C0qt4CZqje/RpKHogg2l7VWhdsGKpznz zMNhgNAbhqd0MYGTjeFJWV58i1rXH18ijn5oE9gM8Ldohy48H3kF7rMSe w==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="269200520" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="269200520" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 02:27:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="773669153" Received: from lkp-server02.sh.intel.com (HELO ff137eb26ff1) ([10.239.97.151]) by orsmga005.jf.intel.com with ESMTP; 18 Jul 2022 02:27:19 -0700 Received: from kbuild by ff137eb26ff1 with local (Exim 4.95) (envelope-from ) id 1oDN26-0004EQ-Ol; Mon, 18 Jul 2022 09:27:18 +0000 Date: Mon, 18 Jul 2022 17:26:45 +0800 From: kernel test robot To: Alvin Lee Cc: kbuild-all@lists.01.org, Linux Memory Management List , Alex Deucher , Jun Lei Subject: [linux-next:master 7026/10906] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:565:64: sparse: sparse: cast truncates bits from constant value (44 becomes 4) Message-ID: <202207181730.9lxOGJy2-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=WawVeLv2; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf31.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658136456; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=JL9mPiKTWz2zfgYrgVoWyMq4XjOf38Du79XlKJukhYI=; b=p3dMkCf+StsbS5DGPy9sfQODN35PsNqIp50RVMJiQWOIn0jpEIRguUv6rhaZBYFNHS5nEG qF7EhhaTbkJaTl5536c5NiXbLhS2HH0hI7dDZcjWjeYwAdEdfUwwE8G8Cc0TQhV1RGInKd 28uCImFf0//x8Zz+IigKctam9aWyAEM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658136456; a=rsa-sha256; cv=none; b=XlLe3GMmXbmhwfLJCwk7XVAVMRQkXPkZLTJEgqtBu2N24HnjbjWKTJUdkhBRYfvA1PymYb xvqpE7NwQMOoRHJ2su+PNxwCfAirigE2GJngbb/DtuNBFw+khf5OSL9YiHb2pLNXmxKceF 3YQ8o6Yhy2rejVYmLRoqTIkvb0eUMyY= X-Rspamd-Queue-Id: D61BB20009 X-Rspam-User: Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=WawVeLv2; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf31.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=lkp@intel.com X-Rspamd-Server: rspam11 X-Stat-Signature: hf9x3f5fsjkib95zj5er8z3pao4wrqcg X-HE-Tag: 1658136455-725442 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 6014cfa5bf32cf8c5c58b3cfd5ee0e1542c8a825 commit: 85f4bc0c333ceed24cbc9f69a2a77fab1ae3d4d1 [7026/10906] drm/amd/display: Add SubVP required code config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20220718/202207181730.9lxOGJy2-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=85f4bc0c333ceed24cbc9f69a2a77fab1ae3d4d1 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 85f4bc0c333ceed24cbc9f69a2a77fab1ae3d4d1 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:549:6: sparse: sparse: symbol 'dc_dmub_setup_subvp_dmub_command' was not declared. Should it be static? >> drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:565:64: sparse: sparse: cast truncates bits from constant value (44 becomes 4) vim +565 drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c 533 534 /** 535 * *************************************************************************************** 536 * dc_dmub_setup_subvp_dmub_command: Populate the DMCUB SubVP command 537 * 538 * This function loops through each pipe and populates the DMUB 539 * SubVP CMD info based on the pipe (e.g. SubVP, VBLANK). 540 * 541 * @param [in] dc: current dc state 542 * @param [in] context: new dc state 543 * @param [in] cmd: DMUB cmd to be populated with SubVP info 544 * 545 * @return: void 546 * 547 * *************************************************************************************** 548 */ 549 void dc_dmub_setup_subvp_dmub_command(struct dc *dc, 550 struct dc_state *context, 551 bool enable) 552 { 553 uint8_t cmd_pipe_index = 0; 554 uint32_t i, pipe_idx; 555 uint8_t subvp_count = 0; 556 union dmub_rb_cmd cmd; 557 struct pipe_ctx *subvp_pipes[2]; 558 uint32_t wm_val_refclk = 0; 559 560 memset(&cmd, 0, sizeof(cmd)); 561 // FW command for SUBVP 562 cmd.fw_assisted_mclk_switch_v2.header.type = DMUB_CMD__FW_ASSISTED_MCLK_SWITCH; 563 cmd.fw_assisted_mclk_switch_v2.header.sub_type = DMUB_CMD__HANDLE_SUBVP_CMD; 564 cmd.fw_assisted_mclk_switch_v2.header.payload_bytes = > 565 sizeof(cmd.fw_assisted_mclk_switch_v2) - sizeof(cmd.fw_assisted_mclk_switch_v2.header); 566 567 for (i = 0; i < dc->res_pool->pipe_count; i++) { 568 struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; 569 570 if (!pipe->stream) 571 continue; 572 573 if (pipe->plane_state && !pipe->top_pipe && 574 pipe->stream->mall_stream_config.type == SUBVP_MAIN) 575 subvp_pipes[subvp_count++] = pipe; 576 } 577 578 if (enable) { 579 // For each pipe that is a "main" SUBVP pipe, fill in pipe data for DMUB SUBVP cmd 580 for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) { 581 struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; 582 583 if (!pipe->stream) 584 continue; 585 586 if (pipe->plane_state && pipe->stream->mall_stream_config.paired_stream && 587 pipe->stream->mall_stream_config.type == SUBVP_MAIN) { 588 populate_subvp_cmd_pipe_info(dc, context, &cmd, pipe, cmd_pipe_index++); 589 } else if (pipe->plane_state && pipe->stream->mall_stream_config.type == SUBVP_NONE) { 590 // Don't need to check for ActiveDRAMClockChangeMargin < 0, not valid in cases where 591 // we run through DML without calculating "natural" P-state support 592 populate_subvp_cmd_vblank_pipe_info(dc, context, &cmd, pipe, cmd_pipe_index++); 593 594 } 595 pipe_idx++; 596 } 597 if (subvp_count == 2) { 598 update_subvp_prefetch_end_to_mall_start(dc, context, &cmd, subvp_pipes); 599 } 600 cmd.fw_assisted_mclk_switch_v2.config_data.pstate_allow_width_us = dc->caps.subvp_pstate_allow_width_us; 601 cmd.fw_assisted_mclk_switch_v2.config_data.vertical_int_margin_us = dc->caps.subvp_vertical_int_margin_us; 602 603 // Store the original watermark value for this SubVP config so we can lower it when the 604 // MCLK switch starts 605 wm_val_refclk = context->bw_ctx.bw.dcn.watermarks.a.cstate_pstate.pstate_change_ns * 606 dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000 / 1000; 607 608 cmd.fw_assisted_mclk_switch_v2.config_data.watermark_a_cache = wm_val_refclk < 0xFFFF ? wm_val_refclk : 0xFFFF; 609 } 610 dc_dmub_srv_cmd_queue(dc->ctx->dmub_srv, &cmd); 611 dc_dmub_srv_cmd_execute(dc->ctx->dmub_srv); 612 dc_dmub_srv_wait_idle(dc->ctx->dmub_srv); 613 } 614 -- 0-DAY CI Kernel Test Service https://01.org/lkp