Bug 63415 - [IVB Bisected]I-G-T sysfs_rps Aborted
Summary: [IVB Bisected]I-G-T sysfs_rps Aborted
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Mika Kuoppala
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-11 05:21 UTC by lu hua
Modified: 2017-10-06 14:46 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2013-04-11 05:21:41 UTC
System Environment:
--------------------------
Arch:             x86_64
Platform:         Ivybridge
Kernel:	(drm-intel-nightly) 60f0bcbcd32a17ec0cbc70d21b45179c384ca4ce

Bug detailed description:
-------------------------
It aborted on ivybridge with drm-intel-next-queued kernel, works well -fixed kernel.

Bisect shows:4f9b2fe0441d4bdf5666a306156b5d6755de2584 is the first bad commit.
commit 4f9b2fe0441d4bdf5666a306156b5d6755de2584
Author:     Ben Widawsky <ben@bwidawsk.net>
AuthorDate: Fri Apr 5 14:29:22 2013 -0700
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Tue Apr 9 18:57:18 2013 +0200

    drm/i915: Better overclock support

    Most importantly this will allow users to set overclock frequencies in
    sysfs. Previously the max was limited by the RP0 max as opposed to the
    overclock max. This is useful if one wants to either limit the max
    overclock frequency, or set the minimum frequency to be in the overclock
    range. It also fixes an issue where if one sets the max frequency to be
    below the overclock max, they wouldn't be able to set back the proper
    overclock max.

    In addition I've added a couple of other bits:
    Show the overclock freq. as max in sysfs
    Print the overclock max in debugfs.
    Print a warning if the user sets the min frequency to be in the
    overclock range.

    In this patch I've decided to store the hw_max when we read it from the
    pcode at init. The reason I do this is the pcode reads can fail, and are
    slow.

    v2: Report when user requested overclocked max (Daniel)
    Remove when user sets min to overclock range (Daniel)

    Reported-by: freezer from #intel-gfx on irc
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
    [danvet: Fixup the s/100MHz/50MHz/ confusion in an unrelated comment
    that Mika spotted.]
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>


output: 
sysfs_rps: sysfs_rps.c:175: main: Assertion `0' failed.
Aborted (core dumped)

dmesg:
[  462.651103] [drm:i915_driver_open],
[  462.651127] [drm:intel_crtc_set_config], [CRTC:3] [FB:27] #connectors=1 (x y) (0 0)
[  462.651131] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  462.651134] [drm:intel_crtc_set_config], [CRTC:5] [NOFB]
[  462.651136] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  462.651138] [drm:intel_crtc_set_config], [CRTC:7] [NOFB]
[  462.651140] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  462.651149] [drm:i915_driver_open],
[  462.651160] [drm:intel_crtc_set_config], [CRTC:3] [FB:27] #connectors=1 (x y) (0 0)
[  462.651162] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  462.651164] [drm:intel_crtc_set_config], [CRTC:5] [NOFB]
[  462.651166] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  462.651167] [drm:intel_crtc_set_config], [CRTC:7] [NOFB]
[  462.651169] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  462.651176] [drm:i915_driver_open],
[  462.651186] [drm:intel_crtc_set_config], [CRTC:3] [FB:27] #connectors=1 (x y) (0 0)
[  462.651188] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  462.651190] [drm:intel_crtc_set_config], [CRTC:5] [NOFB]
[  462.651192] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  462.651194] [drm:intel_crtc_set_config], [CRTC:7] [NOFB]
[  462.651195] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]


Reproduce steps:
----------------
1. ./sysfs_rps
Comment 1 Daniel Vetter 2013-04-11 09:16:20 UTC
One for Ben!
Comment 2 Mika Kuoppala 2013-04-11 10:36:39 UTC
The patch changes the sysfs semantics for reading in /sys/class/drm/card0/gt_max_freq_mhz. The commit message also states this.

Test assumes that reading gt_max_freq_mhz is the notion of current set maximum.

I feel that we should retain the previous semantics and if need be,
make a 'gt_max_oc_freq_mhz' as a read only sysfs entry.

But I don't know the user case for these sysfs entries. Daniel, Ben, comments?
Comment 3 Daniel Vetter 2013-04-11 10:41:44 UTC
Returning a different value than stored is a no-go. So this part needs to be reverted. If we want to show the overclock max somewhere then we need to add a new read-only sysfs file.
Comment 4 Daniel Vetter 2013-04-11 17:13:31 UTC
Fix merged to dinq:

commit e774f3082351b8f9cc87d89e7f2c70b2c67e6c3f
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Thu Apr 11 15:07:59 2013 +0300

    drm/i915: Return stored value from max freq sysfs entry
Comment 5 lu hua 2013-04-12 06:01:16 UTC
Verified. Fixed.
Comment 6 Elizabeth 2017-10-06 14:46:49 UTC
Closing old verified.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.