<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/xe/xe_pcode.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-09-03T14:36:46+00:00</updated>
<entry>
<title>drm/xe/pcode: Treat pcode as per-tile rather than per-GT</title>
<updated>2024-09-03T14:36:46+00:00</updated>
<author>
<name>Matt Roper</name>
<email>matthew.d.roper@intel.com</email>
</author>
<published>2024-08-29T22:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe13fd68337512da4b7aee6326c397e817a943c7'/>
<id>urn:sha1:fe13fd68337512da4b7aee6326c397e817a943c7</id>
<content type='text'>
There's only one instance of the pcode per tile, and for GT-related
accesses both the primary and media GT share the same register
interface.  Since Xe was using per-GT locking, the pcode mutex wasn't
actually protecting everything that it should since concurrent accesses
related to a tile's primary GT and media GT were possible.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matt Roper &lt;matthew.d.roper@intel.com&gt;
Reviewed-by: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240829220619.789159-5-matthew.d.roper@intel.com
(cherry picked from commit 3034cc8107b8d0c7d1b56584394e215dab57f8a3)
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe: Fix the warning conditions</title>
<updated>2024-05-14T15:26:40+00:00</updated>
<author>
<name>Himal Prasad Ghimiray</name>
<email>himal.prasad.ghimiray@intel.com</email>
</author>
<published>2024-05-08T15:22:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c0be90e6874b8af30541c37689780fc7c8276c9'/>
<id>urn:sha1:4c0be90e6874b8af30541c37689780fc7c8276c9</id>
<content type='text'>
The maximum timeout display uses in xe_pcode_request is 3 msec, add the
warning in cases the function is misused with higher timeouts.

Add a warning if pcode_try_request is not passed the timeout parameter
greater than 0.

Cc: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Cc: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Signed-off-by: Himal Prasad Ghimiray &lt;himal.prasad.ghimiray@intel.com&gt;
Reviewed-by: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240508152216.3263109-3-himal.prasad.ghimiray@intel.com
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe: Change pcode timeout to 50msec while polling again</title>
<updated>2024-05-14T15:26:40+00:00</updated>
<author>
<name>Himal Prasad Ghimiray</name>
<email>himal.prasad.ghimiray@intel.com</email>
</author>
<published>2024-05-08T15:22:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c81858eb52266b3d6ba28ca4f62a198231a10cdc'/>
<id>urn:sha1:c81858eb52266b3d6ba28ca4f62a198231a10cdc</id>
<content type='text'>
Polling is initially attempted with timeout_base_ms enabled for
preemption, and if it exceeds this timeframe, another attempt is made
without preemption, allowing an additional 50 ms before timing out.

v2
- Rebase

v3
- Move warnings to separate patch (Lucas)

Cc: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Cc: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Signed-off-by: Himal Prasad Ghimiray &lt;himal.prasad.ghimiray@intel.com&gt;
Fixes: 7dc9b92dcfef ("drm/xe: Remove i915_utils dependency from xe_pcode.")
Reviewed-by: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240508152216.3263109-2-himal.prasad.ghimiray@intel.com
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe: check pcode init status only on root gt of root tile</title>
<updated>2024-04-10T16:32:15+00:00</updated>
<author>
<name>Riana Tauro</name>
<email>riana.tauro@intel.com</email>
</author>
<published>2024-04-10T08:50:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=933fd5ffaf87a60a019992d48e3a96b5c3403d9f'/>
<id>urn:sha1:933fd5ffaf87a60a019992d48e3a96b5c3403d9f</id>
<content type='text'>
The root tile indicates the pcode initialization is complete
when all tiles have completed their initialization.
So the mailbox can be polled only on the root tile.
Check pcode init status only on root tile and move it to
device probe early as root tile is initialized there.
Also make similar changes in resume paths.

v2: add lock/unlocked version of pcode_mailbox_rw
    to allow pcode init to be called in device
    early probe (Rodrigo)

v3: add code description about using root tile
    change function names to xe_pcode_probe_early
    and xe_pcode_init (Rodrigo)

Signed-off-by: Riana Tauro &lt;riana.tauro@intel.com&gt;
Reviewed-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Reviewed-by: Himal Prasad Ghimiray &lt;himal.prasad.ghimiray@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240410085005.1126343-2-riana.tauro@intel.com
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe: Use USEC_PER_MSEC rather than the hard coding</title>
<updated>2024-03-21T13:00:54+00:00</updated>
<author>
<name>Himal Prasad Ghimiray</name>
<email>himal.prasad.ghimiray@intel.com</email>
</author>
<published>2024-03-20T08:33:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f20b7671dffd8515b6a2a996c6796bd990e9cf8d'/>
<id>urn:sha1:f20b7671dffd8515b6a2a996c6796bd990e9cf8d</id>
<content type='text'>
Use USEC_PER_MSEC rather than the hard coded value of 1000.

Static analyzer Reported "casting either timeout_ms or
1000U to type u64" to avoid overflow-before-widen.
Using USEC_PER_MSEC seems better and will help with static analyzer
report cleanup.

Cc: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Signed-off-by: Himal Prasad Ghimiray &lt;himal.prasad.ghimiray@intel.com&gt;
Reviewed-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240320083325.3258720-1-himal.prasad.ghimiray@intel.com
Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe: add skip_pcode flag</title>
<updated>2023-12-21T16:45:09+00:00</updated>
<author>
<name>Koby Elbaz</name>
<email>kelbaz@habana.ai</email>
</author>
<published>2023-11-28T16:53:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=082802a3ee09e764bc1513988d6f5889712fe88f'/>
<id>urn:sha1:082802a3ee09e764bc1513988d6f5889712fe88f</id>
<content type='text'>
Per device, set this flag to enable access to the PCODE uC or to skip it.

Signed-off-by: Koby Elbaz &lt;kelbaz@habana.ai&gt;
Reviewed-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe: Ensure mutex are destroyed</title>
<updated>2023-12-21T16:41:21+00:00</updated>
<author>
<name>Bommithi Sakeena</name>
<email>bommithi.sakeena@intel.com</email>
</author>
<published>2023-09-27T16:50:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28b1d9155c3c1651a6e184e1286cebb63ec6b51c'/>
<id>urn:sha1:28b1d9155c3c1651a6e184e1286cebb63ec6b51c</id>
<content type='text'>
Add missing mutex_destroy calls to fini functions or convert to
drmm_mutex_init where fini function is not available.

Cc: Matthew Brost &lt;matthew.brost@intel.com&gt;
Signed-off-by: Bommithi Sakeena &lt;bommithi.sakeena@intel.com&gt;
Reviewed-by: Niranjana Vishwanathapura &lt;niranjana.vishwanathapura@intel.com&gt;
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe: Invert mask and val in xe_mmio_wait32.</title>
<updated>2023-12-21T16:39:15+00:00</updated>
<author>
<name>Rodrigo Vivi</name>
<email>rodrigo.vivi@intel.com</email>
</author>
<published>2023-07-26T21:03:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=063e09af6e1d9a4f26cdd0eb896c19526cb0afd3'/>
<id>urn:sha1:063e09af6e1d9a4f26cdd0eb896c19526cb0afd3</id>
<content type='text'>
The order: 'offset, mask, val'; is more common in other
drivers and in special in i915, where any dev could copy
a sequence and end up with unexpected behavior.

Done with coccinelle:
@rule1@
expression gt, reg, val, mask, timeout, out, atomic;
@@
- xe_mmio_wait32(gt, reg, val, mask, timeout, out, atomic)
+ xe_mmio_wait32(gt, reg, mask, val, timeout, out, atomic)

spatch -sp_file mmio.cocci *.c *.h compat-i915-headers/intel_uncore.h \
       --in-place

v2: Rebased after changes on xe_guc_mcr usage of xe_mmio_wait32.

Reviewed-by: Matthew Brost &lt;matthew.brost@intel.com&gt;
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe: Cleanup style warnings</title>
<updated>2023-12-21T16:37:31+00:00</updated>
<author>
<name>Francois Dugast</name>
<email>francois.dugast@intel.com</email>
</author>
<published>2023-07-17T14:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e8e7ee6a375217c4f6a9a96d50e3ae711832d37'/>
<id>urn:sha1:3e8e7ee6a375217c4f6a9a96d50e3ae711832d37</id>
<content type='text'>
Reduce the number of warnings reported by checkpatch.pl from 118 to 48 by
addressing those warnings types:

  LEADING_SPACE
  LINE_SPACING
  BRACES
  TRAILING_SEMICOLON
  CONSTANT_COMPARISON
  BLOCK_COMMENT_STYLE
  RETURN_VOID
  ONE_SEMICOLON
  SUSPECT_CODE_INDENT
  LINE_CONTINUATIONS
  UNNECESSARY_ELSE
  UNSPECIFIED_INT
  UNNECESSARY_INT
  MISORDERED_TYPE

Signed-off-by: Francois Dugast &lt;francois.dugast@intel.com&gt;
Reviewed-by: Matthew Brost &lt;matthew.brost@intel.com&gt;
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/xe/mmio: Use struct xe_reg</title>
<updated>2023-12-19T23:33:49+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@intel.com</email>
</author>
<published>2023-05-08T22:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce8bf5bd059542431230eac216693a579dc09dba'/>
<id>urn:sha1:ce8bf5bd059542431230eac216693a579dc09dba</id>
<content type='text'>
Convert all the callers to deal with xe_mmio_*() using struct xe_reg
instead of plain u32. In a few places there was also a rename
s/reg/reg_val/ when dealing with the value returned so it doesn't get
mixed up with the register address.

Reviewed-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Link: https://lore.kernel.org/r/20230508225322.2692066-2-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
</feed>
