zoukankan      html  css  js  c++  java
  • DRM学习总结(1)--- DRM框架介绍

     

    一、DRM 简介

     

    In computing, the Direct Rendering Manager (DRM), a subsystem of the Linux kernel, interfaces with the GPUs of modern video cards. DRM exposes an API that user-space programs can use to send commands and data to the GPU, and to perform operations such as configuring the mode setting of the display. DRM was first developed as the kernel space component of the X Server's Direct Rendering Infrastructure,[1] but since then it has been used by other graphic stack alternatives such as Wayland.

     

    User-space programs can use the DRM API to command the GPU to do hardware-accelerated 3D rendering and video decoding as well as GPGPU computing.

     

    The Linux Kernel already had an API called fbdev allowing to manage the framebuffer of a graphics adapter,[2] but it couldn't be used to handle the needs of modern 3D accelerated GPU based video cards. These type of cards usually require setting and managing a command queue in the card's memory (Video RAM) to dispatch commands to the GPU, and also they need a proper management of the buffers and free space of the Video RAM itself.[3] Initially user space programs (such as the X Server) directly managed these resources, but these programs usually acted as if they were the only ones with access to the card's resources. When two or more programs tried to control the same video card at the same time, and set its resources each one in its own way, most times they ended catastrophically.[3]

    Access to video card without DRM
    Without DRM
    Access to video card with DRM
    With DRM
    DRM allows multiple programs concurrently access to the 3D video card avoiding collisions

    When the Direct Rendering Manager was first created, the purpose was that multiple programs using resources from the video card can cooperate through it.[4] The DRM gets an exclusive access to the video card, and it's responsible for initializing and maintaining the command queue, the VRAM and any other hardware resource. The programs that want to use the GPU send their requests to DRM, which acts as an arbitrator and takes care to avoid possible conflicts.

    Since then, the scope of DRM has been expanded over the years to cover more functionality previously handled by user space programs, such as framebuffer managing and mode setting, memory sharing objects and memory synchronization.[5][6] Some of these expansions had carried their own specific names, such as Graphics Execution Manager (GEM) or Kernel Mode-Setting (KMS), and the terminology prevails when the functionality they provide is specifically alluded. But they are really parts of the whole kernel DRM subsystem.

    The trend to include two GPUs in a computer —a discrete GPU and an integrated one— led to new problems such as GPU switching that should be also solved at the DRM layer. In order to match the Nvidia Optimus technology, DRM was provided with GPU offloading abilities, called PRIME.[7]

     

     

    二、DRM 架构

     

     

     

    参考链接: https://en.wikipedia.org/wiki/Direct_Rendering_Manager

  • 相关阅读:
    将Ajax 中数组转换成字符串 封装成类
    网页中删除数据弹出提示框
    pdo连接数据库
    pdo 的配置与启用
    php中常用的运算符
    [JZOJ 5912] [NOIP2018模拟10.18] VanUSee 解题报告 (KMP+博弈)
    [JZOJ 5910] [NOIP2018模拟10.18] DuLiu 解题报告 (并查集+思维)
    [JZOJ 5852] [NOIP2018提高组模拟9.6] 相交 解题报告 (倍增+LCA)
    [JZOJ 5437] [NOIP2017提高A组集训10.31] Sequence 解题报告 (KMP)
    [JZOJ 5875] [NOIP2018提高组模拟9.20] 听我说,海蜗牛 解题报告(BFS+二分)
  • 原文地址:https://www.cnblogs.com/EaIE099/p/EaIE099_DRM.html
Copyright © 2011-2022 走看看