oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Zack Rusin <zack@kde.org>, dri-devel@lists.freedesktop.org
Cc: oe-kbuild-all@lists.linux.dev,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	"Huang Rui" <ray.huang@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/ttm: Make sure the mapped tt pages are decrypted when needed
Date: Tue, 26 Sep 2023 20:02:14 +0800	[thread overview]
Message-ID: <202309261923.XeaDU2Wg-lkp@intel.com> (raw)
In-Reply-To: <20230926040359.3040017-1-zack@kde.org>

Hi Zack,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.6-rc3 next-20230926]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Zack-Rusin/drm-ttm-Make-sure-the-mapped-tt-pages-are-decrypted-when-needed/20230926-120619
base:   linus/master
patch link:    https://lore.kernel.org/r/20230926040359.3040017-1-zack%40kde.org
patch subject: [PATCH] drm/ttm: Make sure the mapped tt pages are decrypted when needed
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20230926/202309261923.XeaDU2Wg-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230926/202309261923.XeaDU2Wg-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309261923.XeaDU2Wg-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/ttm/ttm_tt.c: In function 'ttm_tt_create':
>> drivers/gpu/drm/ttm/ttm_tt.c:89:41: error: implicit declaration of function 'cc_platform_has' [-Werror=implicit-function-declaration]
      89 |         if (bdev->pool.use_dma_alloc && cc_platform_has(CC_ATTR_MEM_ENCRYPT))
         |                                         ^~~~~~~~~~~~~~~
>> drivers/gpu/drm/ttm/ttm_tt.c:89:57: error: 'CC_ATTR_MEM_ENCRYPT' undeclared (first use in this function)
      89 |         if (bdev->pool.use_dma_alloc && cc_platform_has(CC_ATTR_MEM_ENCRYPT))
         |                                                         ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/ttm/ttm_tt.c:89:57: note: each undeclared identifier is reported only once for each function it appears in
   cc1: some warnings being treated as errors


vim +/cc_platform_has +89 drivers/gpu/drm/ttm/ttm_tt.c

    56	
    57	/*
    58	 * Allocates a ttm structure for the given BO.
    59	 */
    60	int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc)
    61	{
    62		struct ttm_device *bdev = bo->bdev;
    63		uint32_t page_flags = 0;
    64	
    65		dma_resv_assert_held(bo->base.resv);
    66	
    67		if (bo->ttm)
    68			return 0;
    69	
    70		switch (bo->type) {
    71		case ttm_bo_type_device:
    72			if (zero_alloc)
    73				page_flags |= TTM_TT_FLAG_ZERO_ALLOC;
    74			break;
    75		case ttm_bo_type_kernel:
    76			break;
    77		case ttm_bo_type_sg:
    78			page_flags |= TTM_TT_FLAG_EXTERNAL;
    79			break;
    80		default:
    81			pr_err("Illegal buffer object type\n");
    82			return -EINVAL;
    83		}
    84		/*
    85		 * When using dma_alloc_coherent with memory encryption the
    86		 * mapped TT pages need to be decrypted or otherwise the drivers
    87		 * will end up sending encrypted mem to the gpu.
    88		 */
  > 89		if (bdev->pool.use_dma_alloc && cc_platform_has(CC_ATTR_MEM_ENCRYPT))
    90			page_flags |= TTM_TT_FLAG_DECRYPTED;
    91	
    92		bo->ttm = bdev->funcs->ttm_tt_create(bo, page_flags);
    93		if (unlikely(bo->ttm == NULL))
    94			return -ENOMEM;
    95	
    96		WARN_ON(bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE &&
    97			!(bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL));
    98	
    99		return 0;
   100	}
   101	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

           reply	other threads:[~2023-09-26 12:03 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230926040359.3040017-1-zack@kde.org>]

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=202309261923.XeaDU2Wg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ray.huang@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=zack@kde.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).