All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: priyanka.dandamudi@intel.com, matthew.auld@intel.com,
	nirmoy.das@intel.com, intel-gfx@lists.freedesktop.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [Intel-gfx] [PATCH v4 2/2] drm/i915: Add lmem_bar_size modparam
Date: Mon, 11 Jul 2022 09:31:42 +0800	[thread overview]
Message-ID: <202207110435.SWciztlI-lkp@intel.com> (raw)
In-Reply-To: <20220710172925.2465158-3-priyanka.dandamudi@intel.com>

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/priyanka-dandamudi-intel-com/Add-support-for-LMEM-PCIe-resizable-bar/20220711-014151
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220711/202207110435.SWciztlI-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6ce63e267aab79ca87bf63453d34dd3909ab978d)
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://github.com/intel-lab-lkp/linux/commit/d47a4cf71ae8f491be93278f21adfec16dc00d5c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review priyanka-dandamudi-intel-com/Add-support-for-LMEM-PCIe-resizable-bar/20220711-014151
        git checkout d47a4cf71ae8f491be93278f21adfec16dc00d5c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/gt/intel_region_lmem.c:76:45: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
                                                        "setting it to default: %llu\n", lmem_size);
                                                                                ~~~~     ^~~~~~~~~
                                                                                %u
   include/drm/drm_print.h:429:36: note: expanded from macro 'drm_info'
           __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
                                      ~~~    ^~~~~~~~~~~
   include/drm/drm_print.h:425:48: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
                                                  ~~~    ^~~~~~~~~~~
   include/linux/dev_printk.h:150:67: note: expanded from macro 'dev_info'
           dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
                                                                    ~~~     ^~~~~~~~~~~
   include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
                   _p_func(dev, fmt, ##__VA_ARGS__);                       \
                                ~~~    ^~~~~~~~~~~
   drivers/gpu/drm/i915/gt/intel_region_lmem.c:93:44: warning: result of comparison of constant 4294967296 with expression of type 'resource_size_t' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
                                           IORESOURCE_MEM_64) && root_res->start > 0x100000000ull)
                                                                 ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
   2 warnings generated.


vim +76 drivers/gpu/drm/i915/gt/intel_region_lmem.c

    46	
    47	#define LMEM_BAR_NUM 2
    48	static void i915_resize_lmem_bar(struct drm_i915_private *i915, resource_size_t lmem_size)
    49	{
    50		struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
    51		struct pci_bus *root = pdev->bus;
    52		struct resource *root_res;
    53		resource_size_t rebar_size;
    54		resource_size_t current_size;
    55		u32 pci_cmd;
    56		int i;
    57	
    58		current_size = roundup_pow_of_two(pci_resource_len(pdev, LMEM_BAR_NUM));
    59	
    60		if (i915->params.lmem_bar_size) {
    61			u32 bar_sizes;
    62	
    63			rebar_size = i915->params.lmem_bar_size *
    64				(resource_size_t)SZ_1M;
    65			bar_sizes = pci_rebar_get_possible_sizes(pdev,
    66								 LMEM_BAR_NUM);
    67	
    68			if (rebar_size == current_size)
    69				return;
    70	
    71			if (!(bar_sizes & BIT(pci_rebar_bytes_to_size(rebar_size))) ||
    72			    rebar_size >= roundup_pow_of_two(lmem_size)) {
    73					rebar_size = lmem_size;
    74	
    75					drm_info(&i915->drm, "Given bar size is not within supported size,"
  > 76							     "setting it to default: %llu\n", lmem_size);
    77			}
    78		} else {
    79			rebar_size = current_size;
    80	
    81			if (rebar_size != roundup_pow_of_two(lmem_size))
    82				rebar_size = lmem_size;
    83			else
    84				return;
    85		}
    86	
    87		/* Find out if root bus contains 64bit memory addressing */
    88		while (root->parent)
    89			root = root->parent;
    90	
    91		pci_bus_for_each_resource(root, root_res, i) {
    92			if (root_res && root_res->flags & (IORESOURCE_MEM |
    93						IORESOURCE_MEM_64) && root_res->start > 0x100000000ull)
    94				break;
    95		}
    96	
    97		/* pci_resize_resource will fail anyways */
    98		if (!root_res) {
    99			drm_info(&i915->drm, "Can't resize LMEM BAR - platform support is missing\n");
   100			return;
   101		}
   102	
   103		/* First disable PCI memory decoding references */
   104		pci_read_config_dword(pdev, PCI_COMMAND, &pci_cmd);
   105		pci_write_config_dword(pdev, PCI_COMMAND,
   106				       pci_cmd & ~PCI_COMMAND_MEMORY);
   107	
   108		_resize_bar(i915, LMEM_BAR_NUM, rebar_size);
   109	
   110		pci_assign_unassigned_bus_resources(pdev->bus);
   111		pci_write_config_dword(pdev, PCI_COMMAND, pci_cmd);
   112	}
   113	

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

  parent reply	other threads:[~2022-07-11  1:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-10 17:29 [Intel-gfx] [PATCH v4 0/2] Add support for LMEM PCIe resizable bar priyanka.dandamudi
2022-07-10 17:29 ` [Intel-gfx] [PATCH v4 1/2] drm/i915: " priyanka.dandamudi
2022-07-10 19:51   ` kernel test robot
2022-07-10 19:51   ` kernel test robot
2022-07-11 13:50   ` Das, Nirmoy
2022-07-10 17:29 ` [Intel-gfx] [PATCH v4 2/2] drm/i915: Add lmem_bar_size modparam priyanka.dandamudi
2022-07-10 20:01   ` kernel test robot
2022-07-11  1:31   ` kernel test robot [this message]
2022-07-11 14:03   ` Das, Nirmoy
2022-07-10 17:59 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add support for LMEM PCIe resizable bar Patchwork
2022-07-10 17:59 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-07-10 18:20 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-07-10 19:48 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202207110435.SWciztlI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    --cc=matthew.auld@intel.com \
    --cc=nirmoy.das@intel.com \
    --cc=priyanka.dandamudi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.