mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:3602:32: warning: variable 'ret' set but not used
@ 2022-04-23 21:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-23 21:46 UTC (permalink / raw)
  To: Fangzhi Zuo
  Cc: kbuild-all, linux-kernel, Lyude Paul, Lin, Wayne, Bhawanpreet Lakha

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   13bc32bad7059d6c5671e9d037e6e3ed001cc0f4
commit: d740e0bf8ed4c14ac6a616e2b31626bdcf417135 drm/amd/display: Add DP 2.0 MST DC Support
date:   6 months ago
config: powerpc64-randconfig-r033-20220420 (https://download.01.org/0day-ci/archive/20220424/202204240503.RZCZdjrQ-lkp@intel.com/config)
compiler: powerpc64le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d740e0bf8ed4c14ac6a616e2b31626bdcf417135
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d740e0bf8ed4c14ac6a616e2b31626bdcf417135
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:49:
   drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
   drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2819:26: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
    2819 |                 uint64_t temp;
         |                          ^~~~
   drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function 'dc_link_reduce_mst_payload':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:3602:32: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
    3602 |         enum act_return_status ret;
         |                                ^~~


vim +/ret +3602 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c

  3589	
  3590	#if defined(CONFIG_DRM_AMD_DC_DCN)
  3591	enum dc_status dc_link_reduce_mst_payload(struct pipe_ctx *pipe_ctx, uint32_t bw_in_kbps)
  3592	{
  3593		struct dc_stream_state *stream = pipe_ctx->stream;
  3594		struct dc_link *link = stream->link;
  3595		struct fixed31_32 avg_time_slots_per_mtp;
  3596		struct fixed31_32 pbn;
  3597		struct fixed31_32 pbn_per_slot;
  3598		struct link_encoder *link_encoder = link->link_enc;
  3599		struct stream_encoder *stream_encoder = pipe_ctx->stream_res.stream_enc;
  3600		struct dp_mst_stream_allocation_table proposed_table = {0};
  3601		uint8_t i;
> 3602		enum act_return_status ret;
  3603		DC_LOGGER_INIT(link->ctx->logger);
  3604	
  3605		/* decrease throttled vcp size */
  3606		pbn_per_slot = get_pbn_per_slot(stream);
  3607		pbn = get_pbn_from_bw_in_kbps(bw_in_kbps);
  3608		avg_time_slots_per_mtp = dc_fixpt_div(pbn, pbn_per_slot);
  3609	
  3610		stream_encoder->funcs->set_throttled_vcp_size(
  3611					stream_encoder,
  3612					avg_time_slots_per_mtp);
  3613	
  3614		/* send ALLOCATE_PAYLOAD sideband message with updated pbn */
  3615		dm_helpers_dp_mst_send_payload_allocation(
  3616				stream->ctx,
  3617				stream,
  3618				true);
  3619	
  3620		/* notify immediate branch device table update */
  3621		if (dm_helpers_dp_mst_write_payload_allocation_table(
  3622				stream->ctx,
  3623				stream,
  3624				&proposed_table,
  3625				true)) {
  3626			/* update mst stream allocation table software state */
  3627			update_mst_stream_alloc_table(
  3628					link,
  3629					pipe_ctx->stream_res.stream_enc,
  3630					pipe_ctx->stream_res.hpo_dp_stream_enc,
  3631					&proposed_table);
  3632		} else {
  3633			DC_LOG_WARNING("Failed to update"
  3634					"MST allocation table for"
  3635					"pipe idx:%d\n",
  3636					pipe_ctx->pipe_idx);
  3637		}
  3638	
  3639		DC_LOG_MST("%s  "
  3640				"stream_count: %d: \n ",
  3641				__func__,
  3642				link->mst_stream_alloc_table.stream_count);
  3643	
  3644		for (i = 0; i < MAX_CONTROLLER_NUM; i++) {
  3645			DC_LOG_MST("stream_enc[%d]: %p      "
  3646					"stream[%d].vcp_id: %d      "
  3647					"stream[%d].slot_count: %d\n",
  3648					i,
  3649					(void *) link->mst_stream_alloc_table.stream_allocations[i].stream_enc,
  3650					i,
  3651					link->mst_stream_alloc_table.stream_allocations[i].vcp_id,
  3652					i,
  3653					link->mst_stream_alloc_table.stream_allocations[i].slot_count);
  3654		}
  3655	
  3656		ASSERT(proposed_table.stream_count > 0);
  3657	
  3658		/* update mst stream allocation table hardware state */
  3659		link_encoder->funcs->update_mst_stream_allocation_table(
  3660				link_encoder,
  3661				&link->mst_stream_alloc_table);
  3662	
  3663		/* poll for immediate branch device ACT handled */
  3664		ret = dm_helpers_dp_mst_poll_for_allocation_change_trigger(
  3665				stream->ctx,
  3666				stream);
  3667	
  3668		return DC_OK;
  3669	}
  3670	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-23 21:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-23 21:46 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:3602:32: warning: variable 'ret' set but not used kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®