All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [Intel-gfx] [PATCH 3/4] drm/i915/dgfx: OPROM OpRegion Setup
Date: Mon, 07 Feb 2022 01:15:54 +0800	[thread overview]
Message-ID: <202202070147.QgEDP0yH-lkp@intel.com> (raw)
In-Reply-To: <20220206144311.5053-4-anshuman.gupta@intel.com>

[-- Attachment #1: Type: text/plain, Size: 7597 bytes --]

Hi Anshuman,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20220204]
[cannot apply to v5.17-rc2]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Anshuman-Gupta/DGFX-OpRegion/20220206-224445
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20220207/202202070147.QgEDP0yH-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/b59e40b3bc40920eaeeb84c7d36113202cb6dfae
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Anshuman-Gupta/DGFX-OpRegion/20220206-224445
        git checkout b59e40b3bc40920eaeeb84c7d36113202cb6dfae
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/

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 >>):

>> drivers/gpu/drm/i915/display/intel_opregion.c:945: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * intel_spi_get_oprom_opreg() get OPROM OpRegion image.
   drivers/gpu/drm/i915/display/intel_opregion.c:1599: warning: Function parameter or member 'i915' not described in 'intel_opregion_init'


vim +945 drivers/gpu/drm/i915/display/intel_opregion.c

   943	
   944	/**
 > 945	 * intel_spi_get_oprom_opreg() get OPROM OpRegion image.
   946	 * @i915: pointer to i915 device.
   947	 *
   948	 * This function parses the DGFX OPROM to retieve the opregion.
   949	 * OPROM has bundled multiple images but i915 only interested
   950	 * in CSS and opregion image.
   951	 *
   952	 *	+        DGFX OPROM IMAGE LAYOUT             +
   953	 *	+--------+-------+---------------------------+
   954	 *	| Offset | Value |   ROM Header Fields       +-----> Image1 (CSS)
   955	 *	+--------------------------------------------+
   956	 *	|    0h  |  55h  |   ROM Signature Byte1     |
   957	 *	|    1h  |  AAh  |   ROM Signature Byte2     |
   958	 *	|    2h  |  xx   |        Reserved           |
   959	 *	|  18+19h|  xx   |  Ptr to PCI DataStructure |
   960	 *	+----------------+---------------------------+
   961	 *	|           PCI Data Structure               |
   962	 *	+--------------------------------------------+
   963	 *	|    .       .             .                 |
   964	 *	|    .       .             .                 |
   965	 *	|    10  +  xx   +     Image Length          |
   966	 *	|    14  +  xx   +     Code Type             |
   967	 *	|    15  +  xx   +  Last Image Indicator     |
   968	 *	|    .       .             .                 |
   969	 *	+--------------------------------------------+
   970	 *	|         Signature and Public Key           |
   971	 *	+--------+-------+---------------------------+
   972	 *	|    .   |   .   |         .                 |
   973	 *	|    .   |   .   |         .                 |
   974	 *	+--------------------------------------------+
   975	 *	| Offset | Value |   ROM Header Fields       +-----> Image2 (opregion, vbt) (Offset: 0x800)
   976	 *	+--------------------------------------------+
   977	 *	|    0h  |  55h  |   ROM Signature Byte1     |
   978	 *	|    1h  |  AAh  |   ROM Signature Byte2     |
   979	 *	|    2h  |  xx   |        Reserved           |
   980	 *	|  18+19h|  xx   |  Ptr to PCI DataStructure |
   981	 *	+----------------+---------------------------+
   982	 *	|           PCI Data Structure               |
   983	 *	+--------------------------------------------+
   984	 *	|    .       .             .                 |
   985	 *	|    .       .             .                 |
   986	 *	|    10  +  xx   +     Image Length          |
   987	 *	|    14  +  xx   +      Code Type            |
   988	 *	|    15  +  xx   +   Last Image Indicator    |
   989	 *	|    .       .             .                 |
   990	 *	|    1A  +  3C   + Ptr to Opregion Signature |
   991	 *	|    .       .             .                 |
   992	 *	|    .       .             .                 |
   993	 *	|   83Ch + IntelGraphicsMem                  | <---+ Opregion Signature
   994	 *	+--------+-----------------------------------+
   995	 *
   996	 * Return : Returns the opregion image blob which starts from opregion
   997	 * signature "IntelGraphicsMem". Error value in case of error
   998	 */
   999	static void *
  1000	intel_spi_get_oprom_opreg(struct drm_i915_private *i915)
  1001	{
  1002		struct expansion_rom_header *exprom_hdr;
  1003		struct pci_data_structure *exprom_pci_data;
  1004		u8 img_sig[sizeof(OPREGION_SIGNATURE)];
  1005		u32 oprom_offset, offset;
  1006		size_t img_len, opreg_len;
  1007		void *opreg = ERR_PTR(-ENXIO);
  1008		int ret;
  1009	
  1010		oprom_offset = intel_spi_oprom_offset(i915);
  1011	
  1012		exprom_hdr = kzalloc(sizeof(struct expansion_rom_header), GFP_KERNEL);
  1013		exprom_pci_data = kzalloc(sizeof(struct pci_data_structure), GFP_KERNEL);
  1014		if (!exprom_hdr || !exprom_pci_data)
  1015			return ERR_PTR(-ENOMEM);
  1016	
  1017		for (offset = oprom_offset; exprom_pci_data->last_img != LAST_IMG_INDICATOR;
  1018		     offset = offset + img_len) {
  1019			intel_spi_read_oprom(i915, offset, sizeof(struct expansion_rom_header),
  1020					     exprom_hdr);
  1021			intel_spi_read_oprom(i915, offset + exprom_hdr->pcistructoffset,
  1022					     sizeof(struct pci_data_structure), exprom_pci_data);
  1023			ret = pci_exp_rom_check_signature(i915, exprom_hdr, exprom_pci_data);
  1024			if (ret) {
  1025				opreg = ERR_PTR(ret);
  1026				goto err_free_hdr;
  1027			}
  1028	
  1029			img_len = exprom_pci_data->img_len * OPROM_BYTE_BOUNDARY;
  1030	
  1031			/* CSS or OpReg signature is present at exprom_hdr->img_base offset */
  1032			intel_spi_read_oprom(i915, offset + exprom_hdr->img_base,
  1033					     sizeof(OPREGION_SIGNATURE) - 1, img_sig);
  1034	
  1035			if (!memcmp(img_sig, INTEL_CSS_SIGNATURE, NUM_CSS_BYTES)) {
  1036				ret = intel_verify_css(i915, exprom_hdr, exprom_pci_data);
  1037				if (ret) {
  1038					opreg = ERR_PTR(ret);
  1039					goto err_free_hdr;
  1040				}
  1041			} else if (!memcmp(img_sig, OPREGION_SIGNATURE, sizeof(OPREGION_SIGNATURE) - 1)) {
  1042				opreg_len = img_len - exprom_hdr->img_base;
  1043				opreg_len = ALIGN(opreg_len, 4);
  1044				opreg = kzalloc(opreg_len, GFP_KERNEL);
  1045	
  1046				if (!opreg) {
  1047					opreg = ERR_PTR(-ENOMEM);
  1048					goto err_free_hdr;
  1049				}
  1050	
  1051				intel_spi_read_oprom(i915, offset + exprom_hdr->img_base,
  1052						     opreg_len, opreg);
  1053				drm_dbg_kms(&i915->drm, "Found opregion image of size %zu\n", opreg_len);
  1054				break;
  1055			}
  1056		}
  1057	
  1058		kfree(exprom_pci_data);
  1059		kfree(exprom_hdr);
  1060	
  1061	err_free_hdr:
  1062	
  1063		return opreg;
  1064	}
  1065	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

  reply	other threads:[~2022-02-06 17:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-06 14:43 [Intel-gfx] [PATCH 0/4] DGFX OpRegion Anshuman Gupta
2022-02-06 14:43 ` [Intel-gfx] [PATCH 1/4] drm/i915/opregion: Abstract opregion function Anshuman Gupta
2022-02-07 10:59   ` Jani Nikula
2022-02-06 14:43 ` [Intel-gfx] [PATCH 2/4] drm/i915/opregion: Register opreg func only for disp parts Anshuman Gupta
2022-02-07 11:02   ` Jani Nikula
2022-02-06 14:43 ` [Intel-gfx] [PATCH 3/4] drm/i915/dgfx: OPROM OpRegion Setup Anshuman Gupta
2022-02-06 17:15   ` kernel test robot [this message]
2022-02-06 14:43 ` [Intel-gfx] [PATCH 4/4] drm/i915/dgfx: Get VBT from rvda Anshuman Gupta
2022-02-06 15:14 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for DGFX OpRegion Patchwork
2022-02-06 15:15 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-06 15:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-06 17:05 ` [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=202202070147.QgEDP0yH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.