Bug 112141 - RAPL kernel driver should not create sysfs file if platform does not have support
Summary: RAPL kernel driver should not create sysfs file if platform does not have sup...
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - Intel) (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: intel-gfx-bugs@lists.freedesktop.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-08 11:37 UTC by Daniela Prodan
Modified: 2021-07-25 08:53 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.5.0-rc1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg output (135.23 KB, text/plain)
2016-02-08 11:37 UTC, Daniela Prodan
Details
Components built (4.93 KB, text/plain)
2016-02-08 11:38 UTC, Daniela Prodan
Details

Description Daniela Prodan 2016-02-08 11:37:49 UTC
Created attachment 203111 [details]
dmesg output

On an Ironlake platform (Intel Core i5 CPU 650  @ 3.20GHz) , the  /sys/kernel/debug/dri/0/i915_energy_uJ file is created but it cannot be opened, since the platform does not have RAPL driver support. 

# sudo cat /sys/kernel/debug/dri/0/i915_energy_uJ
cat: /sys/kernel/debug/dri/0/i915_energy_uJ: No such device
Comment 1 Daniela Prodan 2016-02-08 11:38:50 UTC
Created attachment 203121 [details]
Components built
Comment 2 Jani Nikula 2016-02-19 14:51:57 UTC
Works as expected, then.

For sure we will keep creating the file for all platforms (and we have plenty of similar cases). It's more up to debate whether the file should be empty or access should return -ENODEV or similar. We seem to do a little bit of both, but the error is more obvious.
Comment 3 Jani Nikula 2016-02-19 14:52:27 UTC
Also, new bugs against i915 should be filed at the freedesktop.org bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel

Note You need to log in before you can comment on or make changes to this bug.