Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support backlight device in virtio gpu #25

Open
wants to merge 1 commit into
base: celadon/u/mr0/master
Choose a base branch
from

Conversation

bosheng1
Copy link
Contributor

Enable virtio backlight function, it will expose sysfs node /sys/class/backlight/virtio-gpu-backlight0 for guest user.

Tracked-On: OAM-117147

@bosheng1
Copy link
Contributor Author

bosheng1 commented Aug 14, 2024

with android EB https://ubit-artifactory-or.intel.com/artifactory/cactus-absp-or-local/celadon_umr0_master-eng/51/r2_base_aaos/userdebug/, backlight function is verified in byd environemnt, verification step:
1 modify android launch script, e.g.
add_virtual_device 4 virtio-gpu lease=DP-3,backlight=max_u9700_l_bl
2 check android kernel log
base_aaos:/sys/class/backlight/virtio-gpu-backlight0 # dmesg |grep backlight
[ 0.764732] [drm] number of virtio backlight: 1
[ 0.765020] [drm] backlight device:virtio-gpu-backlight0 registered
3 set brightness on android, and check the monitor's backlight brightness is changing.
cd /sys/class/backlight/virtio-gpu-backlight0
echo 50 > brightness

Copy link
Contributor

@xyzhao2018 xyzhao2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to add drm/virtio in into the commit header.

@xyzhao2018
Copy link
Contributor

with android EB https://ubit-artifactory-or.intel.com/artifactory/cactus-absp-or-local/celadon_umr0_master-eng/51/r2_base_aaos/userdebug/, backlight function is verified in byd environemnt, verification step: 1 modify android launch script, e.g. add_virtual_device 4 virtio-gpu lease=DP-3,b**acklight=max_u9700_l_bl 2 check android kernel log base_aaos:/sys/class/backlight/virtio-gpu-backlight0 # dmesg |grep backlight [ 0.764732] [drm] number of virtio backlight: 1 [ 0.765020] [drm] backlight device:virtio-gpu-backlight0 registered 3 set brightness on android, and check the monitor's backlight brightness is changing. cd /sys/class/backlight/virtio-gpu-backlight0 echo 50 > brightness

Please add it into the "Test Done" part, like:

Test Done:

  • Boot Android
  • Test mic capture and playback

Tracked-On: OAM-123105

@bosheng1
Copy link
Contributor Author

It is better to add drm/virtio in into the commit header.

got it, thanks for your comment!

@bosheng1
Copy link
Contributor Author

with android EB https://ubit-artifactory-or.intel.com/artifactory/cactus-absp-or-local/celadon_umr0_master-eng/51/r2_base_aaos/userdebug/, backlight function is verified in byd environemnt, verification step: 1 modify android launch script, e.g. add_virtual_device 4 virtio-gpu lease=DP-3,b**acklight=max_u9700_l_bl 2 check android kernel log base_aaos:/sys/class/backlight/virtio-gpu-backlight0 # dmesg |grep backlight [ 0.764732] [drm] number of virtio backlight: 1 [ 0.765020] [drm] backlight device:virtio-gpu-backlight0 registered 3 set brightness on android, and check the monitor's backlight brightness is changing. cd /sys/class/backlight/virtio-gpu-backlight0 echo 50 > brightness

Please add it into the "Test Done" part, like:

Test Done:

  • Boot Android
  • Test mic capture and playback

Tracked-On: OAM-123105

done, PR is updated.

Enable virtio backlight function, it will expose sysfs node
/sys/class/backlight/virtio-gpu-backlight0 for guest user.

Test-done:
- iGPU VF + virtio-GPU;
- backlight setting through command

Tracked-On: OAM-117147
Signed-off-by: Xue, Bosheng <[email protected]>
Copy link
Contributor

@xyzhao2018 xyzhao2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add "Test done:" part.

@bosheng1 bosheng1 force-pushed the celadon/u/mr0/master.backlight_dev branch from 6ff4257 to 297a008 Compare September 3, 2024 07:02
simonami99 pushed a commit that referenced this pull request Sep 18, 2024
[ Upstream commit 431315a563015f259b28e34c5842f6166439e969 ]

When the rcutorture tests start to exit, the rcu_torture_cleanup() is
invoked to stop kthreads and release resources, if the stall-task
kthreads exist, cpu-stall has started and the rcutorture.stall_cpu
is set to a larger value, the rcu_torture_cleanup() will be blocked
for a long time and the hung-task may occur, this commit therefore
add kthread_should_stop() to the loop of cpu-stall operation, when
rcutorture tests ends, no need to wait for cpu-stall to end, exit
directly.

Use the following command to test:

insmod rcutorture.ko torture_type=srcu fwd_progress=0 stat_interval=4
stall_cpu_block=1 stall_cpu=200 stall_cpu_holdoff=10 read_exit_burst=0
object_debug=1
rmmod rcutorture

[15361.918610] INFO: task rmmod:878 blocked for more than 122 seconds.
[15361.918613]       Tainted: G        W
6.8.0-rc2-yoctodev-standard+ #25
[15361.918615] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[15361.918616] task:rmmod           state:D stack:0     pid:878
tgid:878   ppid:773    flags:0x00004002
[15361.918621] Call Trace:
[15361.918623]  <TASK>
[15361.918626]  __schedule+0xc0d/0x28f0
[15361.918631]  ? __pfx___schedule+0x10/0x10
[15361.918635]  ? rcu_is_watching+0x19/0xb0
[15361.918638]  ? schedule+0x1f6/0x290
[15361.918642]  ? __pfx_lock_release+0x10/0x10
[15361.918645]  ? schedule+0xc9/0x290
[15361.918648]  ? schedule+0xc9/0x290
[15361.918653]  ? trace_preempt_off+0x54/0x100
[15361.918657]  ? schedule+0xc9/0x290
[15361.918661]  schedule+0xd0/0x290
[15361.918665]  schedule_timeout+0x56d/0x7d0
[15361.918669]  ? debug_smp_processor_id+0x1b/0x30
[15361.918672]  ? rcu_is_watching+0x19/0xb0
[15361.918676]  ? __pfx_schedule_timeout+0x10/0x10
[15361.918679]  ? debug_smp_processor_id+0x1b/0x30
[15361.918683]  ? rcu_is_watching+0x19/0xb0
[15361.918686]  ? wait_for_completion+0x179/0x4c0
[15361.918690]  ? __pfx_lock_release+0x10/0x10
[15361.918693]  ? __kasan_check_write+0x18/0x20
[15361.918696]  ? wait_for_completion+0x9d/0x4c0
[15361.918700]  ? _raw_spin_unlock_irq+0x36/0x50
[15361.918703]  ? wait_for_completion+0x179/0x4c0
[15361.918707]  ? _raw_spin_unlock_irq+0x36/0x50
[15361.918710]  ? wait_for_completion+0x179/0x4c0
[15361.918714]  ? trace_preempt_on+0x54/0x100
[15361.918718]  ? wait_for_completion+0x179/0x4c0
[15361.918723]  wait_for_completion+0x181/0x4c0
[15361.918728]  ? __pfx_wait_for_completion+0x10/0x10
[15361.918738]  kthread_stop+0x152/0x470
[15361.918742]  _torture_stop_kthread+0x44/0xc0 [torture
7af7f9cbba28271a10503b653f9e05d518fbc8c3]
[15361.918752]  rcu_torture_cleanup+0x2ac/0xe90 [rcutorture
f2cb1f556ee7956270927183c4c2c7749a336529]
[15361.918766]  ? __pfx_rcu_torture_cleanup+0x10/0x10 [rcutorture
f2cb1f556ee7956270927183c4c2c7749a336529]
[15361.918777]  ? __kasan_check_write+0x18/0x20
[15361.918781]  ? __mutex_unlock_slowpath+0x17c/0x670
[15361.918789]  ? __might_fault+0xcd/0x180
[15361.918793]  ? find_module_all+0x104/0x1d0
[15361.918799]  __x64_sys_delete_module+0x2a4/0x3f0
[15361.918803]  ? __pfx___x64_sys_delete_module+0x10/0x10
[15361.918807]  ? syscall_exit_to_user_mode+0x149/0x280

Signed-off-by: Zqiang <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants