Skip to content

Commit

Permalink
Site updated: 2024-06-01 17:29:38
Browse files Browse the repository at this point in the history
  • Loading branch information
taigerhu committed Jun 1, 2024
1 parent 1032d22 commit 57b770a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><meta name="description" content=""><title>TJ的技术博客</title><link rel="stylesheet" type="text/css" href="/css/style.css?v=1.0.0"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/normalize/latest/normalize.min.css"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/pure/latest/pure-min.min.css"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/pure/latest/grids-responsive-min.min.css"><link rel="stylesheet" href="//lib.baomitu.com/font-awesome/4.7.0/css/font-awesome.min.css"><script type="text/javascript" src="//lib.baomitu.com/jquery/latest/jquery.min.js"></script><link rel="icon" mask="" sizes="any" href="/favicon.ico"><link rel="Shortcut Icon" type="image/x-icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon.png"><script type="text/javascript" src="//lib.baomitu.com/clipboard.js/latest/clipboard.min.js"></script><script type="text/javascript" src="//lib.baomitu.com/toastr.js/latest/toastr.min.js"></script><link rel="stylesheet" href="//lib.baomitu.com/toastr.js/latest/toastr.min.css"><meta name="generator" content="Hexo 6.3.0"></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">TJ的技术博客</h1><a id="logo" href="/.">TJ的技术博客</a><p class="description"></p></div><div id="nav-menu"><a class="current" href="/."><i class="fa undefined"> 首页</i></a><a href="/archives/"><i class="fa undefined"> 归档</i></a><a href="/about/"><i class="fa undefined"> 关于</i></a></div></div><div class="pure-g" id="layout"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title"><a href="/kernel-cfi-failure-analysis.html">Kernel CFI failure实例分析</a></h1><div class="post-meta">2024-06-01<span class="separator">|</span><span class="category"><a href="/categories/stab/">stab</a></span><span class="separator_dash">-</span><span class="tags"><a href="/tags/cfi">cfi</a></span></div><div class="post-content">最近压测碰到一例内核死机, 提示CFI failure.
先了解下CFI:

Control-flow integrity (CFI) is a technique used to reduce the ability to redirect the execution of a program’s code in attacker-specified wa...</div><p class="readmore"><a href="/kernel-cfi-failure-analysis.html">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/linux-kernel-drm-overview.html">Linux kernel DRM overview</a></h1><div class="post-meta">2024-05-25<span class="separator">|</span><span class="category"><a href="/categories/dd/">dd</a></span><span class="separator_dash">-</span><span class="tags"><a href="/tags/drm">drm</a></span></div><div class="post-content">I have not touched Linux DRM before, although I’m very familiar with BSP. Now I need to fix display-related issues due to OpenHarmony porting, so let me provide an overview of this...</div><p class="readmore"><a href="/linux-kernel-drm-overview.html">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/upgrade-my-custom-build-server-amd-based.html">我的PC组装升级记</a></h1><div class="post-meta">2024-05-18<span class="separator">|</span><span class="category"><a href="/categories/tools/">tools</a></span><span class="separator_dash">-</span><span class="tags"><a href="/tags/pc">pc</a></span></div><div class="post-content">18年左右为了编译Android组装了一台PC,AMD AM4,2K,主要配置如下:
Control-flow integrity (CFI) is a technique used to reduce the ability to redirect the execution of a program’s code in attacker-specified wa...</div><p class="readmore"><a href="/kernel-cfi-failure-analysis.html">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/linux-kernel-drm-overview.html">Linux kernel DRM overview</a></h1><div class="post-meta">2024-05-25<span class="separator">|</span><span class="category"><a href="/categories/dd/">dd</a></span><span class="separator_dash">-</span><span class="tags"><a href="/tags/drm">drm</a></span></div><div class="post-content">I have not touched Linux DRM before, although I’m very familiar with BSP. Now I need to fix display-related issues due to OpenHarmony porting, so let me start by getting an overvie...</div><p class="readmore"><a href="/linux-kernel-drm-overview.html">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/upgrade-my-custom-build-server-amd-based.html">我的PC组装升级记</a></h1><div class="post-meta">2024-05-18<span class="separator">|</span><span class="category"><a href="/categories/tools/">tools</a></span><span class="separator_dash">-</span><span class="tags"><a href="/tags/pc">pc</a></span></div><div class="post-content">18年左右为了编译Android组装了一台PC,AMD AM4,2K,主要配置如下:

主板:技嘉 GA-A320M-S2H (rev. 1.x)
CPU :AMD Ryzen 3 2200G (盒装) 1100 (+mb)
Expand Down
6 changes: 3 additions & 3 deletions linux-kernel-drm-overview.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><meta name="description" content=""><title>Linux kernel DRM overview | TJ的技术博客</title><link rel="stylesheet" type="text/css" href="/css/style.css?v=1.0.0"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/normalize/latest/normalize.min.css"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/pure/latest/pure-min.min.css"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/pure/latest/grids-responsive-min.min.css"><link rel="stylesheet" href="//lib.baomitu.com/font-awesome/4.7.0/css/font-awesome.min.css"><script type="text/javascript" src="//lib.baomitu.com/jquery/latest/jquery.min.js"></script><link rel="icon" mask="" sizes="any" href="/favicon.ico"><link rel="Shortcut Icon" type="image/x-icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon.png"><script type="text/javascript" src="//lib.baomitu.com/clipboard.js/latest/clipboard.min.js"></script><script type="text/javascript" src="//lib.baomitu.com/toastr.js/latest/toastr.min.js"></script><link rel="stylesheet" href="//lib.baomitu.com/toastr.js/latest/toastr.min.css"><meta name="generator" content="Hexo 6.3.0"></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">Linux kernel DRM overview</h1><a id="logo" href="/.">TJ的技术博客</a><p class="description"></p></div><div id="nav-menu"><a class="current" href="/."><i class="fa undefined"> 首页</i></a><a href="/archives/"><i class="fa undefined"> 归档</i></a><a href="/about/"><i class="fa undefined"> 关于</i></a></div></div><div class="pure-g" id="layout"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title">Linux kernel DRM overview</h1><div class="post-meta">2024-05-25</div><div class="post-content"><p>I have not touched Linux DRM before, although I’m very familiar with BSP. Now I need to fix display-related issues due to OpenHarmony porting, so let me provide an overview of this.</p>
<!DOCTYPE html><html lang="zh-CN"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><meta name="description" content=""><title>Linux kernel DRM overview | TJ的技术博客</title><link rel="stylesheet" type="text/css" href="/css/style.css?v=1.0.0"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/normalize/latest/normalize.min.css"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/pure/latest/pure-min.min.css"><link rel="stylesheet" type="text/css" href="//lib.baomitu.com/pure/latest/grids-responsive-min.min.css"><link rel="stylesheet" href="//lib.baomitu.com/font-awesome/4.7.0/css/font-awesome.min.css"><script type="text/javascript" src="//lib.baomitu.com/jquery/latest/jquery.min.js"></script><link rel="icon" mask="" sizes="any" href="/favicon.ico"><link rel="Shortcut Icon" type="image/x-icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon.png"><script type="text/javascript" src="//lib.baomitu.com/clipboard.js/latest/clipboard.min.js"></script><script type="text/javascript" src="//lib.baomitu.com/toastr.js/latest/toastr.min.js"></script><link rel="stylesheet" href="//lib.baomitu.com/toastr.js/latest/toastr.min.css"><meta name="generator" content="Hexo 6.3.0"></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">Linux kernel DRM overview</h1><a id="logo" href="/.">TJ的技术博客</a><p class="description"></p></div><div id="nav-menu"><a class="current" href="/."><i class="fa undefined"> 首页</i></a><a href="/archives/"><i class="fa undefined"> 归档</i></a><a href="/about/"><i class="fa undefined"> 关于</i></a></div></div><div class="pure-g" id="layout"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title">Linux kernel DRM overview</h1><div class="post-meta">2024-05-25</div><div class="post-content"><p>I have not touched Linux DRM before, although I’m very familiar with BSP. Now I need to fix display-related issues due to OpenHarmony porting, so let me start by getting an overview of this firstly.</p>
<p>DRM(Direct Rendering Manager) was initially designed for accessing GPU hardware, but it has expanded to cover more functions previously handled by userpace, such as GEM(Graphics Execution Manager) and KMS(kernel mode-setting).</p>
<p>The software architecture is as follows:</p>
<p><img src="/images/2024/05/drm-arch.png"></p>
Expand All @@ -14,13 +14,13 @@
<li>CRTC: Read pixel data from different planes and blends them together.</li>
<li>Connector: Phyical connector, like VGA, HDMI, DisplayPort(DP).</li>
<li>Encoder: Encodes the signal from CRTC for the connector.</li>
<li>Panel: The actual screen that diplays the image. Panel types include LCD(IPS, VA, TN) and OLED.</li>
<li>Panel: The actual screen that displays the image. Panel types include LCD(IPS, VA, TN) and OLED.</li>
<li>Monitor: Panel plus other components(power supply, connect port, etc.).</li>
<li>Bridge: Convert signals, such as MIPI DSI to eDP.</li>
</ul>
<p>We can use libdrm&#x2F;modetest to test KMS. The DRM device is <code>/dev/dri/cardX</code>, the code is in <code>drivers/gpu/drm</code>.</p>
<p>OK, that’s all. No need to read kernel documents about DRM now, the wiki is enough.</p>
<h2 id="references"><a href="#references" class="headerlink" title="references"></a>references</h2><ul>
<h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul>
<li><a target="_blank" rel="noopener" href="https://en.wikipedia.org/wiki/Direct_Rendering_Manager">https://en.wikipedia.org/wiki/Direct_Rendering_Manager</a></li>
<li>Rockchip Linux SDK</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<link href="/linux-kernel-drm-overview.html"/>
<url>/linux-kernel-drm-overview.html</url>

<content type="html"><![CDATA[<p>I have not touched Linux DRM before, although I’m very familiar with BSP. Now I need to fix display-related issues due to OpenHarmony porting, so let me provide an overview of this.</p><p>DRM(Direct Rendering Manager) was initially designed for accessing GPU hardware, but it has expanded to cover more functions previously handled by userpace, such as GEM(Graphics Execution Manager) and KMS(kernel mode-setting).</p><p>The software architecture is as follows:</p><p><img src="/images/2024/05/drm-arch.png"></p><p>There are two parts: DRM core and DRM driver(GEM + KMS). Access the DRM via userspace libdrm to avoid duplicate code.</p><p>GEM is the memory managerment in DRM. For example, userspace can use GEM to request memory to store a framebuffer or data required by GPU.</p><p>KMS mode includes screen resolution, color depth and refresh rate.</p><p>The display output pipeline is as follows:</p><figure class="highlight text"><table><tr><td class="code"><pre><span class="line">fb -&gt;plane</span><br><span class="line"> \</span><br><span class="line"> crtc -&gt; encoder -&gt; bridge (optional) -&gt; connector -&gt; display device (monitor, laptop panel...)</span><br><span class="line"> /</span><br><span class="line">fb -&gt;plane</span><br></pre></td></tr></table></figure><ul><li>Framebuffer(fb): Includes pixel data for a single frame or image to be displayed on the screen.</li><li>Plane: Image source, framebuffer feed.</li><li>CRTC: Read pixel data from different planes and blends them together.</li><li>Connector: Phyical connector, like VGA, HDMI, DisplayPort(DP).</li><li>Encoder: Encodes the signal from CRTC for the connector.</li><li>Panel: The actual screen that diplays the image. Panel types include LCD(IPS, VA, TN) and OLED.</li><li>Monitor: Panel plus other components(power supply, connect port, etc.).</li><li>Bridge: Convert signals, such as MIPI DSI to eDP.</li></ul><p>We can use libdrm&#x2F;modetest to test KMS. The DRM device is <code>/dev/dri/cardX</code>, the code is in <code>drivers/gpu/drm</code>.</p><p>OK, that’s all. No need to read kernel documents about DRM now, the wiki is enough.</p><h2 id="references"><a href="#references" class="headerlink" title="references"></a>references</h2><ul><li><a href="https://en.wikipedia.org/wiki/Direct_Rendering_Manager">https://en.wikipedia.org/wiki/Direct_Rendering_Manager</a></li><li>Rockchip Linux SDK</li></ul>]]></content>
<content type="html"><![CDATA[<p>I have not touched Linux DRM before, although I’m very familiar with BSP. Now I need to fix display-related issues due to OpenHarmony porting, so let me start by getting an overview of this firstly.</p><p>DRM(Direct Rendering Manager) was initially designed for accessing GPU hardware, but it has expanded to cover more functions previously handled by userpace, such as GEM(Graphics Execution Manager) and KMS(kernel mode-setting).</p><p>The software architecture is as follows:</p><p><img src="/images/2024/05/drm-arch.png"></p><p>There are two parts: DRM core and DRM driver(GEM + KMS). Access the DRM via userspace libdrm to avoid duplicate code.</p><p>GEM is the memory managerment in DRM. For example, userspace can use GEM to request memory to store a framebuffer or data required by GPU.</p><p>KMS mode includes screen resolution, color depth and refresh rate.</p><p>The display output pipeline is as follows:</p><figure class="highlight text"><table><tr><td class="code"><pre><span class="line">fb -&gt;plane</span><br><span class="line"> \</span><br><span class="line"> crtc -&gt; encoder -&gt; bridge (optional) -&gt; connector -&gt; display device (monitor, laptop panel...)</span><br><span class="line"> /</span><br><span class="line">fb -&gt;plane</span><br></pre></td></tr></table></figure><ul><li>Framebuffer(fb): Includes pixel data for a single frame or image to be displayed on the screen.</li><li>Plane: Image source, framebuffer feed.</li><li>CRTC: Read pixel data from different planes and blends them together.</li><li>Connector: Phyical connector, like VGA, HDMI, DisplayPort(DP).</li><li>Encoder: Encodes the signal from CRTC for the connector.</li><li>Panel: The actual screen that displays the image. Panel types include LCD(IPS, VA, TN) and OLED.</li><li>Monitor: Panel plus other components(power supply, connect port, etc.).</li><li>Bridge: Convert signals, such as MIPI DSI to eDP.</li></ul><p>We can use libdrm&#x2F;modetest to test KMS. The DRM device is <code>/dev/dri/cardX</code>, the code is in <code>drivers/gpu/drm</code>.</p><p>OK, that’s all. No need to read kernel documents about DRM now, the wiki is enough.</p><h2 id="References"><a href="#References" class="headerlink" title="References"></a>References</h2><ul><li><a href="https://en.wikipedia.org/wiki/Direct_Rendering_Manager">https://en.wikipedia.org/wiki/Direct_Rendering_Manager</a></li><li>Rockchip Linux SDK</li></ul>]]></content>


<categories>
Expand Down

0 comments on commit 57b770a

Please sign in to comment.