- 博客(604)
- 资源 (13)
- 收藏
- 关注
原创 cpufreq: cpufreq_online 的大致流程
call cpu driver的init callbackret = cpufreq_driver->init(policy)//初始化policy并调用set_policyret = cpufreq_init_policy(policy);//注册thermal 相关callbackif (cpufreq_thermal_control_enabled(cpufreq_driver))policy->cdev = of_cpufreq_cooling_register(policy
2022-02-10 15:45:27
1028
原创 理解Intel cpufreq intel_pstate driver的工作模式
主要分为支持HWP ,不支持HWP,主动模式和被动模式主动被动支持HWP依赖于gov来选择频率不支持 HWP主动模式下,如果支持HWP, 测CPU的硬件会自动选择频率主动模式下,如果不支持HWP, 那会采用Intel自己的GOV来选择频率, 主要是通过CPU的利用率来进行调频.被动模式没啥好说的了, 基本就是依赖于gov的策略,比如schedutil的算法, 依据基本也是CPU的rq 负载来更新频率.Operation Modesintel_pstate can
2022-02-10 15:09:55
2536
原创 cpufreq: update_limits 实现和引用
void acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag){ int ret; if (ignore_ppc || !pr->performance) { /* * Only when it is notification event, the _OST object * will be evaluated. Otherwise it is skipped. */ if.
2022-02-10 15:04:00
470
原创 cpufreq 频率设置verify
新频率在被设置时需要检查是否在可用范围内.static struct cpufreq_driver longrun_driver = {.flags = CPUFREQ_CONST_LOOPS,.verify = longrun_verify_policy,.setpolicy = longrun_set_policy,.get = longrun_get,.init = longrun_cpu_init,.name = “longrun”,};When the user dec
2022-02-10 14:10:07
529
原创 ubuntu build env setup
sudo apt-get -y dist-upgradesudo apt-get -y build-dep libdrm mesa xserver-xorg-video-ati xorg-server linux-metasudo apt-get -y install build-essential git autoconf automake fakeroot libtool libxi-dev libxmu-dev llvm llvm-dev vim autoconf2.13 vdpau-va-d
2021-09-22 13:28:36
343
原创 GPU Command Submission
mesa/src/gallium/winsys/amdgpu/drm/amdgpu_cs.cstatic void amdgpu_cs_submit_ib(void *job, void *gdata, int thread_index){ struct amdgpu_cs *acs = (struct amdgpu_cs*)job; struct amdgpu_winsys *ws = acs->ws; struct amdgpu_cs_context *cs = acs-&g
2021-09-18 16:28:49
602
转载 2021-08-10
OpenGL API 简介转自http://blog.youkuaiyun.com/menguio/article/details/6112733开发基于OpenGL的应用程序,必须先了解OpenGL的库函数。它采用C语言风格,提供大量的函数来进行图形的处理和显示。OpenGL库函数的命名方式非常有规律。所有OpenGL函数采用了以下格式:<库前缀><根命令><可选的参数个数><可选的参数类型>库前缀有gl、glu、aux、glut、wgl、glx、agl等等,分
2021-08-10 17:21:01
366
原创 how to commit amdgpu ring buffer to IP
amdgpu_ring_allocamdgpu_ring_writeamdgpu_ring_commitstatic int kgd_hiq_mqd_load(struct kgd_dev *kgd, void *mqd, uint32_t pipe_id, uint32_t queue_id, uint32_t doorbell_off){ struct amdgpu_device *adev = get_amdgpu_device(kgd); struct amd
2021-06-05 13:03:46
409
原创 AMD GPU IP Types
/*** DOC: IP Blocks** GPUs are composed of IP (intellectual property) blocks. These* IP blocks provide various functionalities: display, graphics,* video decode, etc. The IP blocks that comprise a particular GPU* are listed in the GPU's respective So
2021-06-05 12:43:18
286
翻译 How To Push Git Branch To Remote
How To Push Git Branch To Remotewritten by SchknHow To Push Git Branch To RemoteIn Git, branches are commonly used in order to develop features independently from the main workflow.Origin Link:https://devconnected.com/how-to-push-git-branch-to-remote
2021-02-10 00:48:48
618
转载 Linux中的VFS实现 [二]
Linux中的VFS实现 [二]Linux中的VFS实现[一]基础操作内核不能感知一个文件的内容和结构,它只是把文件简单地看做字节的集合,并提供了对其内容的字节流访问。对一个文件的常规操作包括创建、删除和读写等。【打开文件】一个进程想要读取或是写入一个文件,必须先建立和文件inode之间的通道,方式是通过open()函数。int open (const char *pathname, int flags, mode_t mode);这里传入的参数是文件所在的路径明(即"pathname"),那
2021-01-25 14:48:27
394
原创 记录修改历史git log 中的某个commit
commit e0eb5b86e0661abdb88b5327caa479861a1d1714 (HEAD)Author: Perry Yuan <perry_yuan@dell.com>Date: Tue Jan 12 08:38:02 2021 -0500 add e.txt add new to e add new to ccommit 8030327c7250f75eef8037cfd93d61904bde4509Author: Perry Yua
2021-01-12 23:40:03
564
转载 ALSA聲卡驅動中的DAPM詳解之一:kcontrol
ALSA聲卡驅動中的DAPM詳解之一:kcontrol2013年10月19日 ⁄ 綜合 ⁄ 共 10203字 ⁄ 字號 小 中 大 ⁄ 評論關閉DAPM是Dynamic Audio Power Management的縮寫,直譯過來就是動態音頻電源管理的意思,DAPM是為了使基於linux的移動設備上的音頻子系統,在任何時候都工作在最小功耗狀態下。DAPM對用戶空間的應用程序來說是透明的,所有與電源相關的開關都在ASoc core中完成。用戶空間的應用程序無需對代碼做出修改,也無需重新編譯,DAPM根據當
2020-11-01 22:38:20
1045
原创 ccache 加速Kernel 编译
安装ccache Install Ccache#sudo apt install ccache配置ccache#vim ~/.bashrc #user is the user directory, this directory is used to save compilation information, you can use other directories. export CCACHE_DIR="/home/perry/.ccache" export CC=".
2020-10-23 20:26:01
1497
转载 算法复杂性和如何计算时间复杂度
一,定义算法的复杂性有时间复杂性和空间复杂性之分这里考虑的是时间复杂性通常考虑3种情况下的时间复杂性:最坏,最好和平均情况下的计算复杂性;当然可操作性最好且最有实际价值的是最坏情况下的时间复杂性T(n)=max(t(i)) 设i是算法A的一个输入,p(i)是出现输入i的概率,算法A对于输入i的计算时间耗费为t(i)首先了解一下几个概念。一个是时间复杂度,一个是渐近时间复杂度。前者是某个算法的时间耗费,它是该算法所求解问题规模n的函数,而后者是指当问题规模趋向无穷大时,该算法时间复杂度的数量级。当
2020-10-20 00:40:38
1520
原创 内核中的优先级列表Plist 使用范例
记录一下内核中优先级列表Plist的使用notifier 通过Plist的方式进行管理,并在client 端的nb 中自定义该nb的优先级.static struct notifier_block privacy_acpi_nb = { .notifier_call = privacy_audio_notify, .next = NULL, .priority = INT_MIN //最高优先级};内核中定义的优先级列表 * * Based on simple lists (i
2020-10-09 10:57:58
413
原创 Notifier 使用demo 之pm notifier
D:\kernel-codes\upstream-kernel\linux\drivers\base\firmware_loader\main.cstruct firmware_cache {/* firmware_buf instance will be added into the below list */spinlock_t lock;struct list_head head;int state;#ifdef CONFIG_FW_CACHE/** Names of firmware
2020-09-20 12:46:17
655
原创 docker 环境下build RHEL8 kernel
为了少折腾 编译环境,研究了一下可以使用docker 把编译环境搭建好之后 换系统可以随时pull 这个image ,并挂载本地volume 到docker 下做编译开发.简单记录一下步骤podman pull registry.redhat.io/ubi8/ubipodman tag registry.redhat.io/ubi8/ubi registry.redhat.io/ubi8:build之后就可以随意配置编译环境 并commit 进自己的build tag 下保存起来简单方便的环
2020-05-08 22:38:41
483
原创 Soundwire 的 Machine Driver
sof_sdw.c 这个文件实现了Intel 新Soundwire 平台的Machine Driversof_sdw - ASOC Machine driver for Intel SoundWire platformssof_sdw_rt5682.cstatic struct sof_sdw_codec_info codec_info_list[] = { { .id = 0x70...
2020-05-02 22:08:28
747
原创 extract_package 函数 解析
struct acpi_battery { struct mutex lock; struct mutex sysfs_lock; struct power_supply *bat; struct power_supply_desc bat_desc; struct acpi_device *device; struct notifier_block pm_nb; struct li...
2020-04-30 13:56:56
817
原创 ACPI Battery 电池管理 - 1
定义acpi battery 结构体保存global的一些参数struct acpi_battery { struct mutex lock; struct mutex sysfs_lock; struct power_supply *bat; struct power_supply_desc bat_desc; struct acpi_device *device; struct ...
2020-04-30 12:45:07
1401
原创 docker image create and export
https://raw.githubusercontent.com/docker/docker/master/contrib/mkimage-yum.sh或者https://github.com/moby/moby/blob/master/contrib/mkimage-yum.sh[root@localhost /]# chmod 777 mkimage-yum.sh[root@localh...
2020-04-16 23:49:38
274
转载 per-entity load tracking
作者:linuxer 发布于:2018-8-18 10:27 分类:进程管理一、为何需要per-entity load tracking?对于Linux内核而言,做一款好的进程调度器是一项非常具有挑战性的任务,主要原因是在进行CPU资源分配的时候必须满足如下的需求:1、它必须是公平的2、快速响应3、系统的throughput要高4、功耗要小其实你仔细分析上面的需求,这些目标其实是相互...
2020-03-31 21:32:42
288
转载 linux设备驱动之pci设备的I/O和内存
本文系本站原创,欢迎转载!转载请注明出处:http://ericxiao.cublog.cn/Pci设备的I/O和内存是一个比较复杂的问题.如下的总线结构:在上图的总线结构中,ethernet设备和pci-pci bridge的同类型资源空间必须要是pci bus0的一个子集例如,pci bus 0的I/O端口资源是0x00CC~0x01CC. Ethernet设备的I/O范围的是0x0...
2020-03-30 23:26:22
979
原创 Configure Proxy for Docker
1. On the Docker client, create or edit the file ~/.docker/config.json in the home directory of the user which starts containers. 2. Add JSON such as the following, substituting the type of proxy wit...
2020-03-18 20:41:08
292
转载 xserver相关知识汇总
xserver相关知识汇总转载QTVLC 最后发布于2018-08-16 13:41:52 阅读数 726 收藏展开本文主要是从以下几个方面介绍xorg-xserver 相关的知识1.linux系统图形界面框架2.xserver 和x client启动过程3.图形2d,3d加速原理简介4.xserver主分支代码解析。5.xserver,xclient协议简介6.一个基于Xli...
2020-03-15 23:32:40
4441
原创 git push local branch commit to remote branch
git checkout -b battery_modesgit branch --set-upstream-to=remotes/origin/feature/LINUX-395-develop-battery-kernel-interface-for-custom-charge battery_modes[pyuan@workstation linux_dell]$ git branch...
2020-02-28 23:55:45
855
原创 Enum power_supply_property
```cenum power_supply_property { /* Properties of type `int' */ POWER_SUPPLY_PROP_STATUS = 0, POWER_SUPPLY_PROP_CHARGE_TYPE, POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_PRESENT, POWER_SUPPLY_P...
2020-02-27 23:54:06
819
转载 How To Reset Root User Password In CentOS/RHEL8
Posted by Jarrod on September 14, 2016Leave a comment (47)Go to commentsNormally resetting the root password is a simple task if you’re logged in already with root privileges, however if you forget t...
2020-01-29 14:18:05
337
原创 drm debug log with drm.debug=6 debug
t:s0 msg='unit=kmod-static-nodes comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'[ 14.717497] systemd[719]: Operating on architecture: x86-64[ 14.719652] a...
2019-12-22 23:36:49
3682
1
转载 DRM的基本概念
摘要:DRM 是linux 下的图形渲染架构(Direct Render Manager) , 具体的说是显卡驱动的一种架构(驱动如何玩? 把功能封装成 open/close/ioctl 等标准接口,应用程序调用这些接口来驱动设备)。作为显卡,最基本的功能就是把用户的绘图输出到显示屏上,DRM 如何去实现呢,先看看DRM 把“这件事”给你概括的几个基本要素:画布(FrameBuffer) ...
2019-12-20 00:44:36
5835
原创 How GPU encoder Attached to Connector
https://www.kernel.org/doc/html/v4.15/gpu/drm-kms.htmldrm_connector_attach_encoder connect the encoder and connector .The core code is :connector->encoder_ids[i] = encoder->base.id;/** * ...
2019-11-05 17:25:16
283
原创 Matrix Graph Sample Code
// MGraph.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <stdlib.h>#include <stdio.h>const int MaxVertexNum = 100;typedef int WeightType;...
2019-11-05 16:36:10
298
原创 二叉搜索树的demo code
树的建立树节点的查询:最大,最小,某个节点值树节点的删除// Binary_Search_Tree.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <stdlib.h>#include <stdio.h>typedef i...
2019-11-04 17:04:11
158
原创 数据结构-队列学习
#include <stdio.h>#include <stdlib.h>#include <stdfix.h>typedef int ElementType;typedef int Position;typedef struct QNode{ ElementType *Data; Position front,rear; ...
2019-10-31 19:44:02
187
原创 二叉搜索树的插入删除操作
二插搜索树的插入删除操作node find(node BiTree,ELEMENT_TYPE X )//迭代 的方式查找最大元素节点,右子树最后面的节点就是最大值,同理左子树最小值为最左侧的节点node find_Max1(node Bitree)node find_Min(node Bitree)//尾递归 的方式查找最大元素节点node find_Max(node Bitree...
2019-10-09 12:26:02
285
原创 堆栈Stack的数组实现方法
//// Created by Perry Yuan on 2019/9/26.//#include <stdio.h>#include <stdlib.h>#include <time.h>#include <stdbool.h>#define MaxSize 200typedef int ElementType ;typ...
2019-09-27 00:30:55
311
转载 配置QtDesigner、PyUIC及PyRcc
配置QtDesigner、PyUIC及PyRcc配置QtDesigner、PyUIC及PyRcc安装完PyQt 5 及PyQt5-tools 后,则需要在Pycharm中配置QtDesigner、PyUIC及PyRcc.配置QtDesigner,按照如下两幅图操作配置PyUIC,按照如下图操作Parameters: -m PyQt5.uic.pyu...
2019-09-13 23:20:11
714
转载 最常用的数据结构预算法:
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。本文链接:https://blog.youkuaiyun.com/ityqing/article/details/82838524数据结构指的是“一组数据的存储结构”,算法指的是“操作数据的一组方法”。数据结构是为算法服务的,算法是要作用再特定的数据结构上的。最常用的数据结构预算法:数据结构:数组...
2019-09-13 23:18:58
773
转载 详解数字音频接口DAI
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。本文链接:https://blog.youkuaiyun.com/fengfeng0328/article/details/83046175概述数字音频接口DAI,即Digital Audio Interfaces,顾名思义,DAI表示在板级或板间传输数字音频信号的方式。相比于模拟接口,数字音频接口抗...
2019-08-16 00:37:34
2087
Linux 系統 Z87[z87x]系列主板,intel 千兆網卡驅動.
2013-12-19
第4章 嵌入式USB驱动分析
2011-05-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人