summaryrefslogtreecommitdiff
path: root/tests/i915/i915_pm_backlight.c
AgeCommit message (Collapse)Author
2021-10-11igt: s/DRM_FORMAT_MOD_NONE/DRM_FORMAT_MOD_LINEAR/Ville Syrjälä
DRM_FORMAT_MOD_LINEAR is the more sensible name for DRM_FORMAT_MOD_NONE. Use the better name. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2021-07-15Nuke local versions of DRM_FORMAT and DRM_MODELucas De Marchi
Use the definition from kernel headers. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2020-02-13i915/pm_backlight: ensure driver is loaded before checking backlightJani Nikula
Checking the existence of the backlight interface before ensuring the driver is loaded skips whenever the test is run without the driver loaded. None of the tests would work properly if they were run as the first thing or after tests that unload the driver. Open the driver (and thus probe it as needed) as the first thing. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2020-01-31lib: Find the associated runtime-pm sysfs for the deviceChris Wilson
Remove the hardcoded path to the igfx (00:00:02.00) and instead pass in the fd of the DRM device we wish to control, and look up the associated device/power/ under sysfs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2019-12-03tests/i915: remove igt_skip_on_simulation()Swati Sharma
Removing igt_skip_on_simulation() from all i915 specific tests since this feature is not supported anymore. v2: Rebase Signed-off-by: Swati Sharma <swati2.sharma@intel.com> Signed-off-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-09-20lib/igt_pm: igt lib helper routines to support DC5/6 testsJyoti Yadav
This patch does the following changes to lib/igt_pm.c -dmc_loaded() will be used by new test i915_pm_dc.c which will validate Display C States. So moving the same to igt_pm library. -Introduced igt_disable_runtime_pm() in order to disable runtime suspend for the function which support dc9. -Changed the igt_pm_enable_sata_link_power_management() and igt_pm_restore_sata_link_power_management() in order to save and restore the sata link power policy by an exit handler. v2: Simplify the comment section. v3: Remove . from the subject line. v4: Rebased, resolve conflicts in pm_rpm.c Included patch set version change log. v5: Listing actual change in patch set changelog to make review easier. v6: igt's lib added support for disabling runtime suspend, change in commit log. rebased due to test name pm_rpm changed to i915_pm_rpm. v7: Addressed review comment by saving POWER_DIR values in igt_disable_runtime_pm(). [Imre] v8: Addressed the review comment, igt_pm_enable_sata_link_power_management function to restore the original SATA link power policy if things fail by using an exit handler. [Imre] v9: IGT failure fixture in i915_pm_backlight and i915_pm_rpm. v10:Review comment fixup in sata_link_power_management lib functions. [Imre] v11:Add igt_assert_fd(pm_status_fd) in igt_disable_runtime_pm(). [Imre & Petri] v12: Refactor igt_pm_pc8_plus_residencies_enabled() from supports_pc8_plus_residencies(). Changed igt_disable_runtime_pm() return type. [Imre] Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2019-04-04i915/pm_backlight: Do not turn off DPMS before system suspendHarish Chegondi
backlight fade with suspend test turns off dpms which turns off the edp backlight. Then it does a system suspend and resume. After resume, the edp backlight would still be off, but the test sets the brightness value and reads it back. Since the edp backlight is off, the brightness values written and read are different causing the test to fail. Do not turn off the DPMS before suspend so that after system resume, the edp backlight would be on and setting the brightness value would be successful. v2: Remove "DPMS off" before system suspend instead of adding "DPMS on" after system resume. Cc: Jyoti Yadav <jyoti.r.yadav@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Clinton Taylor <clinton.a.taylor@intel.com> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=107820 Fixes: 377752242995 ("Brightness test with DPMS and System suspend.") Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2019-02-20tests: Prefix pm_ tests with i915_ and move them to i915/Arkadiusz Hiler
They are i915-specific, so they belong to the directory. The (now) infix _pm_ is quite informative and worth keeping. v2: also prefix .c files Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ewelina Musial <ewelina.musial@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>