drm/i915/opregion: move acpi notifier to dev_priv
Subsystems (2)
PATCH 1/1 drm/i915/opregion: move acpi notifier to dev_priv
Get rid of the silly static variable.
--- drivers/gpu/drm/i915/intel_opregion.c | 31 ++++++++++++------------------- drivers/gpu/drm/i915/intel_opregion.h | 1 + 2 files changed, 13 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/intel_opregion.c +12 -19
@@ -608,16 +608,16 @@ void intel_opregion_asle_intr(struct drm_i915_private *dev_priv)#define ACPI_EV_LID (1<<1)#define ACPI_EV_DOCK (1<<2) -static struct intel_opregion *system_opregion; - +/* +* The only video events relevant to opregion are 0x80. These indicate either a +* docking event, lid switch or display switch request. In Linux, these are +* handled by the dock, button and video drivers. +*/ static int intel_opregion_video_event (struct notifier_block *nb,unsigned long val,void *data) { -/* The only video events relevant to opregion are 0x80. These indicate -either a docking event, lid switch or display switch request. In -Linux, these are handled by the dock, button and video drivers. -*/ - + struct intel_opregion *opregion = container_of(nb, struct intel_opregion, + acpi_notifier);struct acpi_bus_event *event = data;struct opregion_acpi *acpi;int ret =NOTIFY_OK ;
@@ -625,10 +625,7 @@ static int intel_opregion_video_event(struct notifier_block *nb,if (strcmp (event->device_class,ACPI_VIDEO_CLASS ) !=0 )return NOTIFY_DONE ; -if (!system_opregion) -return NOTIFY_DONE ; - - acpi = system_opregion->acpi; + acpi = opregion->acpi;if (event->type ==0x80 && ((acpi->cevt &1 ) ==0 )) ret =NOTIFY_BAD ;
@@ -638,10 +635,6 @@ static int intel_opregion_video_event(struct notifier_block *nb,return ret; } -static struct notifier_block intel_opregion_notifier = { - .notifier_call = intel_opregion_video_event, -}; -/* * Initialise the DIDL field in opregion. This passes a list of devices to * the firmware. Values are defined by section B.4.2 of the ACPI specification
@@ -797,8 +790,8 @@ void intel_opregion_register(struct drm_i915_private *dev_priv) opregion->acpi->csts =0 ; opregion->acpi->drdy =1 ; - system_opregion = opregion; -register_acpi_notifier (&intel_opregion_notifier); + opregion->acpi_notifier.notifier_call = intel_opregion_video_event; +register_acpi_notifier (&opregion->acpi_notifier); }if (opregion->asle) {
@@ -822,8 +815,8 @@ void intel_opregion_unregister(struct drm_i915_private *dev_priv)if (opregion->acpi) { opregion->acpi->drdy =0 ; - system_opregion =NULL ; -unregister_acpi_notifier (&intel_opregion_notifier); +unregister_acpi_notifier (&opregion->acpi_notifier); + opregion->acpi_notifier.notifier_call =NULL ; }/* just clear all opregion memory pointers now */
drivers/gpu/drm/i915/intel_opregion.h +1 -0
@@ -49,6 +49,7 @@ struct intel_opregion {u32 vbt_size;u32 *lid_state;struct work_struct asle_work; +struct notifier_block acpi_notifier; };#define OPREGION_SIZE (8 * 1024)
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Jani Nikula (2018-06-13 12:39:27)
Quoted 3 lines
Get rid of the silly static variable.
Signed-off-by Jani Nikula <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
AppliedQuoted 5 lines · Chris Wilson
Quoting Jani Nikula (2018-06-13 12:39:27)
Quoted 3 lines
Get rid of the silly static variable.
Signed-off-by Jani Nikula <[email protected]>Reviewed-by Chris Wilson <[email protected]>
Pushed to dinq, thanks for the review.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/opregion: move acpi notifier to dev_priv
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915/opregion: move acpi notifier to dev_priv
URL : https://patchwork.freedesktop.org/series/44694/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4309 -> Patchwork_9284 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9284 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9284, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/44694/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9284:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_gttfill@basic:
fi-pnv-d510: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_9284 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ctx_switch@basic-default-heavy:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#105719) +1
igt@kms_flip@basic-plain-flip:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106097)
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: PASS -> DMESG-WARN (fdo#106607)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: DMESG-WARN (fdo#105128) -> PASS
igt@kms_flip@basic-flip-vs-modeset:
fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-c:
fi-glk-j4005: DMESG-WARN (fdo#106097) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-cnl-psr: DMESG-WARN (fdo#104951) -> PASS fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
fdo#106607 https://bugs.freedesktop.org/show_bug.cgi?id=106607
== Participating hosts (43 -> 38) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4309 -> Patchwork_9284
CI_DRM_4309: 2740c5b0d0f40092355b329a62ede8cced7f64b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4517: e94ce40798e35d2e3c4494f50b617908066bbf8b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9284: 2084fb72b973bdb184a8c568502cdd444afb378c @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
2084fb72b973 drm/i915/opregion: move acpi notifier to dev_priv
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9284/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/opregion: move acpi notifier to dev_priv
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915/opregion: move acpi notifier to dev_priv
URL : https://patchwork.freedesktop.org/series/44694/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4309_full -> Patchwork_9284_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9284_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9284_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9284_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_9284_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_gtt:
shard-glk: NOTRUN -> INCOMPLETE (k.org#198133, fdo#103359)
igt@drv_selftest@mock_scatterlist:
shard-glk: NOTRUN -> DMESG-WARN (fdo#103667)
igt@gem_exec_schedule@pi-ringfull-bsd:
shard-glk: NOTRUN -> FAIL (fdo#103158)
igt@gem_mmap_gtt@coherency:
shard-glk: NOTRUN -> FAIL (fdo#100587)
igt@kms_cursor_legacy@flip-vs-cursor-atomic:
shard-glk: NOTRUN -> FAIL (fdo#102670)
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: PASS -> FAIL (fdo#105189)
igt@kms_flip@plain-flip-ts-check:
shard-glk: NOTRUN -> FAIL (fdo#100368)
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc:
shard-glk: NOTRUN -> FAIL (fdo#103167, fdo#104724)
igt@kms_setmode@basic:
shard-glk: NOTRUN -> FAIL (fdo#99912)
igt@kms_sysfs_edid_timing:
shard-glk: NOTRUN -> WARN (fdo#100047)
igt@perf_pmu@busy-accuracy-50-vcs1:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
==== Possible fixes ====
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-glk: FAIL (fdo#105363) -> PASS
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-hsw: FAIL (fdo#102887) -> PASS
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-hsw: FAIL (fdo#102887, fdo#105363) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt:
shard-glk: FAIL (fdo#103167, fdo#104724) -> PASS fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#100587 https://bugs.freedesktop.org/show_bug.cgi?id=100587
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103667 https://bugs.freedesktop.org/show_bug.cgi?id=103667
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4309 -> Patchwork_9284
CI_DRM_4309: 2740c5b0d0f40092355b329a62ede8cced7f64b9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4517: e94ce40798e35d2e3c4494f50b617908066bbf8b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9284: 2084fb72b973bdb184a8c568502cdd444afb378c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9284/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx