<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IN" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Few comments inline over email as I have not yet got subscription :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">First of all I could not apply patch, it looks like some patch landed yesterday which needs you patch to respin.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div style="mso-element:para-border-div;border:solid #CCCCCC 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:white">
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">index 05a03129dc54..dac24b99f526 100644</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -75,7 +75,8 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #define GEN12_VE1_AUX_NV _MMIO(0x42b8)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#define AUX_INV REG_BIT(0)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">-#define XEHP_TILE0_ADDR_RANGE MCR_REG(0x4900)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+#define XEHP_TILE_ADDR_RANGE(_idx) MCR_REG(0x4900 + (_idx) * 4)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#define XEHP_FLAT_CCS_BASE_ADDR MCR_REG(0x4910)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #define CHICKEN_RASTER_1 MCR_REG(0x6204)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">index 24dc5d2e9e05..ebd297ff6fcd 100644</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">--- a/drivers/gpu/drm/xe/xe_device_types.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">+++ b/drivers/gpu/drm/xe/xe_device_types.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -1,6 +1,6 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /* SPDX-License-Identifier: MIT */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">/*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * Copyright © 2022 Intel Corporation</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * Copyright © 2022-2023 Intel Corporation</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #ifndef _XE_DEVICE_TYPES_H_<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -202,6 +202,8 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#A020F0;mso-fareast-language:EN-IN"> struct xe_device {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> * known as small-bar.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> resource_size_t io_size;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ /** @base: Offset to apply for Device Physical Address control */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ resource_size_t base;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /** @mapping: pointer to VRAM mappable space */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> void *__iomem mapping;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> } vram;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">index 7c47d67aa8be..a2417cc2f696 100644</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">--- a/drivers/gpu/drm/xe/xe_gt_types.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">+++ b/drivers/gpu/drm/xe/xe_gt_types.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -1,6 +1,6 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /* SPDX-License-Identifier: MIT */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">/*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * Copyright © 2022 Intel Corporation</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * Copyright © 2022-2023 Intel Corporation</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #ifndef _XE_GT_TYPES_H_<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -149,12 +149,14 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#A020F0;mso-fareast-language:EN-IN"> struct xe_gt {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> * @io_size: IO size of this VRAM instance<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> *<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> * This represents how much of this VRAM we can access<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * via the CPU through the VRAM BAR. This can be smaller</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * than @size, in which case only part of VRAM is CPU</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * accessible (typically the first 256M). This</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * configuration is known as small-bar.</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * via the CPU through the VRAM BAR.</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * This can be smaller than the actual @size, in which</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * case only part of VRAM is CPU accessible (typically</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * the first 256M). This configuration is known as small-bar.</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> resource_size_t io_size;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ /** @base: offset of VRAM starting base */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ resource_size_t base;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /** @size: size of VRAM. */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> resource_size_t size;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /** @mapping: pointer to VRAM mappable space */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">index 6c1591a4f43e..60c1b92a87f7 100644</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">--- a/drivers/gpu/drm/xe/xe_mmio.c</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">+++ b/drivers/gpu/drm/xe/xe_mmio.c</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -3,6 +3,8 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> * Copyright © 2021-2023 Intel Corporation<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+#include <linux/minmax.h></span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#include "xe_mmio.h"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #include <drm/drm_managed.h><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -184,32 +186,83 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#A020F0;mso-fareast-language:EN-IN"> int xe_determine_lmem_bar_size(struct xe_device *xe)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> if (!xe->mem.vram.io_size)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> return -EIO;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ xe->mem.vram.base = 0; /* DPA offset */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /* set up a map to the total memory area. */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> xe->mem.vram.mapping = ioremap_wc(xe->mem.vram.io_start, xe->mem.vram.io_size);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> return 0;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+/*</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * 4 possible sizes:</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * - io size (from pci_resource_len of LMEM bar)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * - TILEx size</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * - GSMBASE offset (TILEx - "stolen")</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * - CSSBASE offset (TILEx - CSS space necessary)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ *</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * NOTE: CSSBASE is always lower/smaller offset then GSMBASE.</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ *</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * The actual available size of memory is to the CCS or GSM base.</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * NOTE: multi-tile bases will include the tile offset.</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+int xe_mmio_vram_tile_size(struct xe_gt *gt, u64 *vram_size, u64 *tile_size, u64 *tile_offset)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+{</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ int err;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u32 reg;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (err)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ return err;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (gt->xe->info.has_flat_ccs) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ reg = xe_gt_mcr_unicast_read_any(gt, XEHP_FLAT_CCS_BASE_ADDR);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ offset = (u64)REG_FIELD_GET(GENMASK(31, 8), reg) * SZ_64K;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ } else {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ offset = xe_mmio_read64(gt, GEN12_GSMBASE.reg);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ }</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (unlikely(gt->xe->info.platform == XE_DG1)) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ *tile_size = offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ *tile_offset = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ } else {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ reg = xe_gt_mcr_unicast_read_any(gt, XEHP_TILE_ADDR_RANGE(gt->info.id));</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ *tile_size = (u64)REG_FIELD_GET(GENMASK(14, 8), reg) * SZ_1G;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ *tile_offset = (u64)REG_FIELD_GET(GENMASK(7, 1), reg) * SZ_1G;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ }</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ /* remove the tile offset so we have just the available size */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ *vram_size = offset - *tile_offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ return xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+}</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">int xe_mmio_probe_vram(struct xe_device *xe)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ resource_size_t io_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 available_size = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 total_size = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> struct xe_gt *gt;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 tile_offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 tile_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 vram_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> int err;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> u8 id;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> if (!IS_DGFX(xe)) {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- xe->mem.vram.mapping = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- xe->mem.vram.io_start = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- xe->mem.vram.io_size = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">-</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- for_each_gt(gt, xe, id) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.mapping = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.size = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.io_start = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.io_size = 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- }</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ memset(&xe->mem.vram, 0, sizeof(xe->mem.vram));</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ for_each_gt(gt, xe, id)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ memset(>->mem.vram, 0, sizeof(gt->mem.vram));</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> return 0;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ /* Get the size of the gt0 vram for later accessibility comparison */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ gt = xe_device_get_gt(xe, 0);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ err = xe_mmio_vram_tile_size(gt, &vram_size, &tile_size, &tile_offset);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (err)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ return err;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> err = xe_determine_lmem_bar_size(xe);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> if (err)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> return err;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -217,57 +270,53 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#A020F0;mso-fareast-language:EN-IN"> int xe_mmio_probe_vram(struct xe_device *xe)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> drm_info(&xe->drm, "VISIBLE VRAM: %pa, %pa\n", &xe->mem.vram.io_start,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> &xe->mem.vram.io_size);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- /* FIXME: Assuming equally partitioned VRAM, incorrect */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- if (xe->info.tile_count > 1) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- u8 adj_tile_count = xe->info.tile_count;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- resource_size_t size, io_start, io_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ /* small bar issues will only cover gt0 sizes */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (xe->mem.vram.io_size < vram_size)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ drm_warn(&xe->drm, "Restricting VRAM size to PCI resource size (0x%llx->0x%llx)\n",</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ vram_size, (u64)xe->mem.vram.io_size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- for_each_gt(gt, xe, id)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- if (xe_gt_is_media_type(gt))</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- --adj_tile_count;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ io_size = xe->mem.vram.io_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- XE_BUG_ON(!adj_tile_count);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ /* gt specific ranges */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ for_each_gt(gt, xe, id) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (xe_gt_is_media_type(gt))</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ continue;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- size = xe->mem.vram.io_size / adj_tile_count;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- io_start = xe->mem.vram.io_start;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- io_size = xe->mem.vram.io_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ err = xe_mmio_vram_tile_size(gt, &vram_size, &tile_size, &tile_offset);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (err)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ return err;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- for_each_gt(gt, xe, id) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- if (id && !xe_gt_is_media_type(gt)) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- io_size -= min(io_size, size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- io_start += io_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- }</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ gt->mem.vram.io_start = xe->mem.vram.io_start + tile_offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.size = size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">-</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- /*</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * XXX: multi-tile small-bar might be wild. Hopefully</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * full tile without any mappable vram is not something</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * we care about.</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">-</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.io_size = min(size, io_size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- if (io_size) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.io_start = io_start;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.mapping = xe->mem.vram.mapping +</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- (io_start - xe->mem.vram.io_start);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- } else {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- drm_err(&xe->drm, "Tile without any CPU visible VRAM. Aborting.\n");</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- return -ENODEV;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- }</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ /* io_size "could be 0" for small-bar systems, so no CPU access */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ gt->mem.vram.io_size = min_t(u64, vram_size, io_size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ gt->mem.vram.base = xe->mem.vram.base + tile_offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ gt->mem.vram.size = vram_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ gt->mem.vram.mapping = xe->mem.vram.mapping + tile_offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ drm_info(&xe->drm, "VRAM[%u, %u]: %pa, %pa\n", id, gt->info.vram_id,</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ >->mem.vram.io_start, >->mem.vram.size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (gt->mem.vram.io_size < gt->mem.vram.size)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ drm_info(&xe->drm, "VRAM[%u, %u]: CPU access limited to %pa\n", id,</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ gt->info.vram_id, >->mem.vram.io_size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ /* calculate total size using tile size to get the correct HW sizing */</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ total_size += tile_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ available_size += vram_size;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">I think you can make this available_size = vram_size; instead as last GT for which this loop
runs,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">Will get total available size. Otherwise you may get more size than actual available. For
example,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">10 bytes for tile0, 10 bytes for tile1, 20 bytes for tile2 should return total 40b, but I
think with<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">Above logic you will get 10 + 20 + 40. I am assuming offset is incremental per tile. If you
can give <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">Memory offset overall snapshot, that might help in case I am wrong.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- drm_info(&xe->drm, "VRAM[%u, %u]: %pa, %pa\n",</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- id, gt->info.vram_id, >->mem.vram.io_start,</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- >->mem.vram.size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (total_size > xe->mem.vram.io_size) {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ drm_warn(&xe->drm, "VRAM: %pa is larger than resource %pa\n",</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ &total_size, &xe->mem.vram.io_size);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- } else {</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.size = xe->mem.vram.io_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.io_start = xe->mem.vram.io_start;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.io_size = xe->mem.vram.io_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- gt->mem.vram.mapping = xe->mem.vram.mapping;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- drm_info(&xe->drm, "VRAM: %pa\n", >->mem.vram.size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ io_size -= min_t(u64, tile_size, io_size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ drm_info(&xe->drm, "Available VRAM: %pa, %pa\n", &xe->mem.vram.io_start,</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ &available_size);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">Here it can be little more readable, but its my opinion, up to you :<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">drm_info(&xe->drm, "Available VRAM: start addr: %pa, size: %pa\n", &xe->mem.vram.io_start,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN"> &available_size);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> return 0;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -287,9 +336,6 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#A020F0;mso-fareast-language:EN-IN"> static void xe_mmio_probe_tiles(struct xe_device *xe)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> if (xe->info.media_verx100 >= 1300)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> xe->info.tile_count *= 2;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- drm_info(&xe->drm, "tile_count: %d, adj_tile_count %d\n",</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- xe->info.tile_count, adj_tile_count);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">-</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> if (xe->info.tile_count > 1) {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> const int mmio_bar = 0;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> size_t size;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">diff --git a/drivers/gpu/drm/xe/xe_mmio.h b/drivers/gpu/drm/xe/xe_mmio.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">index 1a32e0f52261..1c588db0b074 100644</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">--- a/drivers/gpu/drm/xe/xe_mmio.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">+++ b/drivers/gpu/drm/xe/xe_mmio.h</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -1,6 +1,6 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /* SPDX-License-Identifier: MIT */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">/*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- * Copyright © 2021 Intel Corporation</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ * Copyright © 2021-2023 Intel Corporation</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #ifndef _XE_MMIO_H_<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -120,6 +120,6 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#A020F0;mso-fareast-language:EN-IN"> static inline bool xe_mmio_in_range(const struct xe_mmio_range *range, u32 reg)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> int xe_mmio_probe_vram(struct xe_device *xe);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">-int xe_mmio_total_vram_size(struct xe_device *xe, u64 *vram_size, u64 *flat_ccs_base);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+int xe_mmio_vram_tile_size(struct xe_gt *gt, u64 *vram_size, u64 *tile_size, u64 *tile_offset);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #endif<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">index 9136c035db0e..acc11f580db4 100644</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">--- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:seagreen;mso-fareast-language:EN-IN">+++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -12,9 +12,11 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #include <drm/ttm/ttm_range_manager.h><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> #include "regs/xe_regs.h"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+#include "regs/xe_gt_regs.h"</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#include "xe_bo.h"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#include "xe_device.h"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#include "xe_gt.h"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+#include "xe_gt_mcr.h"</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#include "xe_mmio.h"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#include "xe_res_cursor.h"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">#include "xe_ttm_stolen_mgr.h"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -51,21 +53,26 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#A020F0;mso-fareast-language:EN-IN"> bool xe_ttm_stolen_cpu_access_needs_ggtt(struct xe_device *xe)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> return GRAPHICS_VERx100(xe) < 1270 && !IS_DGFX(xe);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">-static s64 detect_bar2_dgfx(struct xe_device *xe, struct xe_ttm_stolen_mgr *mgr)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+static s64 detect_bar2_dgfx(struct xe_gt *gt, struct xe_ttm_stolen_mgr *mgr)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- u64 vram_size, stolen_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 stolen_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 tile_offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 tile_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ u64 vram_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- vram_size = xe->mem.vram.io_size;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (drm_WARN_ON(>->xe->drm,</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ xe_mmio_vram_tile_size(gt, &vram_size, &tile_size, &tile_offset)) < 0)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ return 0;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /* Use DSM base address instead for stolen memory */<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- mgr->stolen_base = xe_mmio_read64(to_gt(xe), GEN12_DSMBASE.reg) & GEN12_BDSM_MASK;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- if (drm_WARN_ON(&xe->drm, vram_size < mgr->stolen_base))</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ mgr->stolen_base = (xe_mmio_read64(gt, GEN12_DSMBASE.reg) & GEN12_BDSM_MASK) - tile_offset;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (drm_WARN_ON(>->xe->drm, tile_size < mgr->stolen_base))</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> return 0;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- stolen_size = vram_size - mgr->stolen_base;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ stolen_size = tile_size - mgr->stolen_base;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">Should it be tile_offset instead,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">stolen_size = tile_offset - mgr->stolen_base;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#C55A11;mso-style-textfill-fill-color:#C55A11;mso-style-textfill-fill-alpha:100.0%;mso-fareast-language:EN-IN">Tejas<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- if (mgr->stolen_base + stolen_size <= vram_size)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- mgr->io_base = xe->mem.vram.io_start + mgr->stolen_base;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ if (mgr->stolen_base + stolen_size <= tile_size)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ mgr->io_base = gt->mem.vram.io_start + mgr->stolen_base;</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> /*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> * There may be few KB of platform dependent reserved memory at the end<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<b><span style="font-size:10.0pt;font-family:Consolas;color:brown;mso-fareast-language:EN-IN">@@ -133,7 +140,7 @@</span></b><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN">
</span><span style="font-size:10.0pt;font-family:Consolas;color:#A020F0;mso-fareast-language:EN-IN"> void xe_ttm_stolen_mgr_init(struct xe_device *xe)</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> int err;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> if (IS_DGFX(xe))<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:slateblue;mso-fareast-language:EN-IN">- stolen_size = detect_bar2_dgfx(xe, mgr);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:darkcyan;mso-fareast-language:EN-IN">+ stolen_size = detect_bar2_dgfx(to_gt(xe), mgr);</span><span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> else if (GRAPHICS_VERx100(xe) >= 1270)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> stolen_size = detect_bar2_integrated(xe, mgr);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:10.75pt;background:white;word-break:break-all;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-IN"> else<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>