Skip to contentSkip to conversation

drm/i915/display: Pass drm_i915_private as param to i915 funcs

PATCH Superseded Nirmoy Das 4 participants 5 messages Jan 24, 2023 – Jan 25, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 drm/i915/display: Pass drm_i915_private as param to i915 funcs

For i915 functions pass struct drm_i915_private directly instead of struct drm_device.

---
 drivers/gpu/drm/i915/display/intel_display.c | 2 +-
 drivers/gpu/drm/i915/display/intel_fbdev.c   | 8 ++++----
 drivers/gpu/drm/i915/display/intel_fbdev.h   | 8 ++++----
 drivers/gpu/drm/i915/i915_driver.c           | 4 +++-
 4 files changed, 12 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -1
index e37cca6b18c6..b014d8626ef7 100644
@@ -9004,7 +9004,7 @@ void intel_display_driver_register(struct drm_i915_private *i915)
 	 * enabled. We do it last so that the async config cannot run
 	 * before the connectors are registered.
 	 */
-	intel_fbdev_initial_config_async(&i915->drm);
+	intel_fbdev_initial_config_async(i915);
 
 	/*
 	 * We need to coordinate the hotplugs with the asynchronous
drivers/gpu/drm/i915/display/intel_fbdev.c +4 -4
index 19f3b5d92a55..c2c52f8e5887 100644
@@ -547,9 +547,9 @@ static void intel_fbdev_initial_config(void *data, async_cookie_t cookie)
 		intel_fbdev_unregister(to_i915(ifbdev->helper.dev));
 }
 
-void intel_fbdev_initial_config_async(struct drm_device *dev)
+void intel_fbdev_initial_config_async(struct drm_i915_private *dev_priv)
 {
-	struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
+	struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
 
 	if (!ifbdev)
 		return;
@@ -686,9 +686,9 @@ void intel_fbdev_output_poll_changed(struct drm_device *dev)
 		drm_fb_helper_hotplug_event(&ifbdev->helper);
 }
 
-void intel_fbdev_restore_mode(struct drm_device *dev)
+void intel_fbdev_restore_mode(struct drm_i915_private *dev_priv)
 {
-	struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
+	struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
 
 	if (!ifbdev)
 		return;
drivers/gpu/drm/i915/display/intel_fbdev.h +4 -4
index 0e95e9472fa3..04fd523a5023 100644
@@ -15,12 +15,12 @@ struct intel_framebuffer;
 
 #ifdef CONFIG_DRM_FBDEV_EMULATION
 int intel_fbdev_init(struct drm_device *dev);
-void intel_fbdev_initial_config_async(struct drm_device *dev);
+void intel_fbdev_initial_config_async(struct drm_i915_private *dev_priv);
 void intel_fbdev_unregister(struct drm_i915_private *dev_priv);
 void intel_fbdev_fini(struct drm_i915_private *dev_priv);
 void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous);
 void intel_fbdev_output_poll_changed(struct drm_device *dev);
-void intel_fbdev_restore_mode(struct drm_device *dev);
+void intel_fbdev_restore_mode(struct drm_i915_private *dev_priv);
 struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev);
 #else
 static inline int intel_fbdev_init(struct drm_device *dev)
@@ -28,7 +28,7 @@ static inline int intel_fbdev_init(struct drm_device *dev)
 	return 0;
 }
 
-static inline void intel_fbdev_initial_config_async(struct drm_device *dev)
+static inline void intel_fbdev_initial_config_async(struct drm_i915_private *dev_priv)
 {
 }
 
@@ -48,7 +48,7 @@ static inline void intel_fbdev_output_poll_changed(struct drm_device *dev)
 {
 }
 
-static inline void intel_fbdev_restore_mode(struct drm_device *dev)
+static inline void intel_fbdev_restore_mode(struct drm_i915_private *i915)
 {
 }
 static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev)
drivers/gpu/drm/i915/i915_driver.c +3 -1
index 6469c7c1e154..cd6069c1762d 100644
@@ -1071,7 +1071,9 @@ static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
  */
 static void i915_driver_lastclose(struct drm_device *dev)
 {
-	intel_fbdev_restore_mode(dev);
+	struct drm_i915_private *i915 = to_i915(dev);
+
+	intel_fbdev_restore_mode(i915);
 
 	vga_switcheroo_process_delayed_switch();
 }
Signature · 1 line
2.39.0
#1 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Pass drm_i915_private as param to i915 funcs (rev2)

== Series Details ==

== Series Details ==

Series: drm/i915/display: Pass drm_i915_private as param to i915 funcs (rev2)
URL : https://patchwork.freedesktop.org/series/113083/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12629 -> Patchwork_113083v2
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/index.html

Participating hosts (37 -> 39)
------------------------------

Additional (2): fi-tgl-dsi fi-pnv-d510

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_113083v2:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@i915_selftest@live@gt_lrc:
- {fi-tgl-dsi}: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/fi-tgl-dsi/igt@i915_selftest@live@gt_lrc.html

Known issues
------------

Here are the changes found in Patchwork_113083v2 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@kms_psr@primary_page_flip:
- fi-pnv-d510: NOTRUN -> [SKIP][2] ([fdo#109271]) +44 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/fi-pnv-d510/igt@kms_psr@primary_page_flip.html

#### Possible fixes ####

* igt@i915_module_load@load:
- fi-ctg-p8600: [DMESG-WARN][3] ([i915#6020]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/fi-ctg-p8600/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/fi-ctg-p8600/igt@[email protected]

* igt@i915_selftest@live@reset:
- {bat-adlm-1}: [DMESG-FAIL][5] ([i915#4983]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/bat-adlm-1/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/bat-adlm-1/igt@i915_selftest@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6020]: https://gitlab.freedesktop.org/drm/intel/issues/6020
[i915#7077]: https://gitlab.freedesktop.org/drm/intel/issues/7077
[i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7625]: https://gitlab.freedesktop.org/drm/intel/issues/7625
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828

Build changes
-------------

* Linux: CI_DRM_12629 -> Patchwork_113083v2

CI-20190529: 20190529
CI_DRM_12629: c4d436608c4e9080082fd25e4d9764f27c039292 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7136: 31b6af91747ad8c705399c9006cdb81cb1864146 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113083v2: c4d436608c4e9080082fd25e4d9764f27c039292 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

65ad2434fcd3 drm/i915/display: Pass drm_i915_private as param to i915 funcs

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/index.html

#2 lore raw

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/display: Pass drm_i915_private as param to i915 funcs (rev2)

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/i915/display: Pass drm_i915_private as param to i915 funcs (rev2)
URL : https://patchwork.freedesktop.org/series/113083/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12629_full -> Patchwork_113083v2_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_113083v2_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_113083v2_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/index.html

Participating hosts (12 -> 11)
------------------------------

Additional (1): shard-rkl0
Missing (2): pig-skl-6260u pig-kbl-iris

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_113083v2_full:

### IGT changes ###

#### Possible regressions ####

* igt@kms_cursor_legacy@flip-vs-cursor-busy-crc-legacy:
- shard-glk: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-glk4/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-glk8/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_113083v2_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fair@basic-pace@vcs0:
- shard-glk: [PASS][3] -> [FAIL][4] ([i915#2842]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-glk3/igt@gem_exec_fair@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-glk7/igt@gem_exec_fair@[email protected]

* igt@perf@stress-open-close:
- shard-glk: [PASS][5] -> [INCOMPLETE][6] ([i915#5213])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-glk5/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-glk1/igt@[email protected]

* igt@runner@aborted:
- shard-glk: NOTRUN -> [FAIL][7] ([i915#4312])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-glk1/igt@[email protected]

#### Possible fixes ####

* igt@gem_bad_reloc@negative-reloc:
- {shard-rkl}: [SKIP][8] ([i915#3281]) -> [PASS][9] +10 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-4/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-5/igt@[email protected]

* igt@gem_ctx_exec@basic-nohangcheck:
- {shard-rkl}: [FAIL][10] ([i915#6268]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-3/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-2/igt@[email protected]

* igt@gem_exec_balancer@fairslice:
- {shard-rkl}: [SKIP][12] ([i915#6259]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-5/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-2/igt@[email protected]

* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-glk: [FAIL][14] ([i915#2842]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-glk4/igt@gem_exec_fair@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-glk8/igt@gem_exec_fair@[email protected]

* igt@gem_partial_pwrite_pread@writes-after-reads:
- {shard-rkl}: [SKIP][16] ([i915#3282]) -> [PASS][17] +3 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-1/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-5/igt@[email protected]

* igt@gen9_exec_parse@bb-start-out:
- {shard-rkl}: [SKIP][18] ([i915#2527]) -> [PASS][19] +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-1/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-5/igt@[email protected]

* igt@i915_hangman@gt-engine-error@bcs0:
- {shard-rkl}: [SKIP][20] ([i915#6258]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-5/igt@i915_hangman@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-3/igt@i915_hangman@[email protected]

* igt@kms_async_flips@alternate-sync-async-flip@pipe-c-hdmi-a-1:
- shard-glk: [FAIL][22] ([i915#2521]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-glk5/igt@kms_async_flips@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-glk9/igt@kms_async_flips@[email protected]

* igt@kms_ccs@pipe-b-crc-primary-basic-y_tiled_gen12_rc_ccs_cc:
- {shard-rkl}: [SKIP][24] ([i915#1845] / [i915#4098]) -> [PASS][25] +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-4/igt@kms_ccs@pipe-b-crc-primary-basic-y_tiled_gen12_rc_ccs_cc.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-6/igt@kms_ccs@pipe-b-crc-primary-basic-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-gtt:
- {shard-rkl}: [SKIP][26] ([i915#1849] / [i915#4098]) -> [PASS][27] +1 similar issue
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-4/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-6/igt@[email protected]

* igt@perf_pmu@idle@rcs0:
- {shard-rkl}: [FAIL][28] ([i915#4349]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12629/shard-rkl-2/igt@perf_pmu@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113083v2/shard-rkl-3/igt@perf_pmu@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825
[i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#6016]: https://gitlab.freedesktop.org/drm/intel/issues/6016
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
[i915#6258]: https://gitlab.freedesktop.org/drm/intel/issues/6258
[i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
[i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949

Build changes
-------------

* Linux: CI_DRM_12629 -> Patchwork_113083v2
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_12629: c4d436608c4e9080082fd25e4d9764f27c039292 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7136: 31b6af91747ad8c705399c9006cdb81cb1864146 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113083v2: c4d436608c4e9080082fd25e4d9764f27c039292 @ 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_113083v2/index.html

Reviewed-by on v1 1/1
#3 lore raw
In reply to Nirmoy Das
Quoted 98 lines · Nirmoy Das

For i915 functions pass struct drm_i915_private directly instead of struct drm_device.

---
  drivers/gpu/drm/i915/display/intel_display.c | 2 +-
  drivers/gpu/drm/i915/display/intel_fbdev.c   | 8 ++++----
  drivers/gpu/drm/i915/display/intel_fbdev.h   | 8 ++++----
  drivers/gpu/drm/i915/i915_driver.c           | 4 +++-
  4 files changed, 12 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -1
index e37cca6b18c6..b014d8626ef7 100644
@@ -9004,7 +9004,7 @@ void intel_display_driver_register(struct drm_i915_private *i915)
  	 * enabled. We do it last so that the async config cannot run
  	 * before the connectors are registered.
  	 */
-	intel_fbdev_initial_config_async(&i915->drm);
+	intel_fbdev_initial_config_async(i915);
 
  	/*
  	 * We need to coordinate the hotplugs with the asynchronous
drivers/gpu/drm/i915/display/intel_fbdev.c +4 -4
index 19f3b5d92a55..c2c52f8e5887 100644
@@ -547,9 +547,9 @@ static void intel_fbdev_initial_config(void *data, async_cookie_t cookie)
  		intel_fbdev_unregister(to_i915(ifbdev->helper.dev));
  }
 
-void intel_fbdev_initial_config_async(struct drm_device *dev)
+void intel_fbdev_initial_config_async(struct drm_i915_private *dev_priv)
  {
-	struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
+	struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
 
  	if (!ifbdev)
  		return;
@@ -686,9 +686,9 @@ void intel_fbdev_output_poll_changed(struct drm_device *dev)
  		drm_fb_helper_hotplug_event(&ifbdev->helper);
  }
 
-void intel_fbdev_restore_mode(struct drm_device *dev)
+void intel_fbdev_restore_mode(struct drm_i915_private *dev_priv)
  {
-	struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
+	struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
 
  	if (!ifbdev)
  		return;
drivers/gpu/drm/i915/display/intel_fbdev.h +4 -4
index 0e95e9472fa3..04fd523a5023 100644
@@ -15,12 +15,12 @@ struct intel_framebuffer;
 
  #ifdef CONFIG_DRM_FBDEV_EMULATION
  int intel_fbdev_init(struct drm_device *dev);
-void intel_fbdev_initial_config_async(struct drm_device *dev);
+void intel_fbdev_initial_config_async(struct drm_i915_private *dev_priv);
  void intel_fbdev_unregister(struct drm_i915_private *dev_priv);
  void intel_fbdev_fini(struct drm_i915_private *dev_priv);
  void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous);
  void intel_fbdev_output_poll_changed(struct drm_device *dev);
-void intel_fbdev_restore_mode(struct drm_device *dev);
+void intel_fbdev_restore_mode(struct drm_i915_private *dev_priv);
  struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev);
  #else
  static inline int intel_fbdev_init(struct drm_device *dev)
@@ -28,7 +28,7 @@ static inline int intel_fbdev_init(struct drm_device *dev)
  	return 0;
  }
 
-static inline void intel_fbdev_initial_config_async(struct drm_device *dev)
+static inline void intel_fbdev_initial_config_async(struct drm_i915_private *dev_priv)
  {
  }
 
@@ -48,7 +48,7 @@ static inline void intel_fbdev_output_poll_changed(struct drm_device *dev)
  {
  }
 
-static inline void intel_fbdev_restore_mode(struct drm_device *dev)
+static inline void intel_fbdev_restore_mode(struct drm_i915_private *i915)
  {
  }
  static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev)
drivers/gpu/drm/i915/i915_driver.c +0 -0
index 6469c7c1e154..cd6069c1762d 100644

drivers/gpu/drm/i915/i915_driver.c static int i915_driver_open(struct drm_device *dev, struct drm_file *file) · line 1076

Quoted 7 lines
drivers/gpu/drm/i915/i915_driver.c +3 -1
@@ -1071,7 +1071,9 @@ static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
   */
  static void i915_driver_lastclose(struct drm_device *dev)
  {
-	intel_fbdev_restore_mode(dev);
+	struct drm_i915_private *i915 = to_i915(dev);
+
+	intel_fbdev_restore_mode(i915);

You could use to_i915(dev) without alias.

Regards
Andrzej

Quoted 3 lines
drivers/gpu/drm/i915/i915_driver.c +0 -0
  	vga_switcheroo_process_delayed_switch();
  }
#4 lore raw
Quoted 100 lines · Andrzej Hajda
Quoted 99 lines · Nirmoy Das

For i915 functions pass struct drm_i915_private directly instead of struct drm_device.

---
  drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_fbdev.c   | 8 ++++---- drivers/gpu/drm/i915/display/intel_fbdev.h   | 8 ++++---- drivers/gpu/drm/i915/i915_driver.c           | 4 +++-

  4 files changed, 12 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -1
index e37cca6b18c6..b014d8626ef7 100644
@@ -9004,7 +9004,7 @@ void intel_display_driver_register(struct 
 drm_i915_private *i915)
        * enabled. We do it last so that the async config cannot run
        * before the connectors are registered.
        */
-    intel_fbdev_initial_config_async(&i915->drm);
+    intel_fbdev_initial_config_async(i915);
         /*
        * We need to coordinate the hotplugs with the asynchronous
drivers/gpu/drm/i915/display/intel_fbdev.c +2 -1
index 19f3b5d92a55..c2c52f8e5887 100644
@@ -547,9 +547,9 @@ static void intel_fbdev_initial_config(void 
 *data, async_cookie_t cookie)
 intel_fbdev_unregister(to_i915(ifbdev->helper.dev));
   }
   -void intel_fbdev_initial_config_async(struct drm_device *dev)
+void intel_fbdev_initial_config_async(struct drm_i915_private 
 *dev_priv)
   {
-    struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
+    struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
         if (!ifbdev)

          return;

drivers/gpu/drm/i915/display/intel_fbdev.c +2 -1
@@ -686,9 +686,9 @@ void intel_fbdev_output_poll_changed(struct 
 drm_device *dev)
           drm_fb_helper_hotplug_event(&ifbdev->helper);
   }
   -void intel_fbdev_restore_mode(struct drm_device *dev)
+void intel_fbdev_restore_mode(struct drm_i915_private *dev_priv)
   {
-    struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
+    struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
         if (!ifbdev)
           return;
drivers/gpu/drm/i915/display/intel_fbdev.h +3 -2
index 0e95e9472fa3..04fd523a5023 100644
@@ -15,12 +15,12 @@ struct intel_framebuffer;
     #ifdef CONFIG_DRM_FBDEV_EMULATION
   int intel_fbdev_init(struct drm_device *dev);
-void intel_fbdev_initial_config_async(struct drm_device *dev);
+void intel_fbdev_initial_config_async(struct drm_i915_private 
 *dev_priv);
   void intel_fbdev_unregister(struct drm_i915_private *dev_priv);
   void intel_fbdev_fini(struct drm_i915_private *dev_priv);
   void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous);
   void intel_fbdev_output_poll_changed(struct drm_device *dev);
-void intel_fbdev_restore_mode(struct drm_device *dev);
+void intel_fbdev_restore_mode(struct drm_i915_private *dev_priv);
   struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev);
   #else
   static inline int intel_fbdev_init(struct drm_device *dev)
@@ -28,7 +28,7 @@ static inline int intel_fbdev_init(struct 
 drm_device *dev)
       return 0;
   }
   -static inline void intel_fbdev_initial_config_async(struct drm_device *dev)
+static inline void intel_fbdev_initial_config_async(struct 
 drm_i915_private *dev_priv)
   {

  }
  @@ -48,7 +48,7 @@ static inline void intel_fbdev_output_poll_changed(struct drm_device *dev) {
  }
  -static inline void intel_fbdev_restore_mode(struct drm_device *dev)
+static inline void intel_fbdev_restore_mode(struct drm_i915_private
*i915)
  {
  }
  static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev)

drivers/gpu/drm/i915/i915_driver.c +0 -0
index 6469c7c1e154..cd6069c1762d 100644
@@ -1071,7 +1071,9 @@ static int i915_driver_open(struct drm_device 
 *dev, struct drm_file *file)
    */
Quoted 8 lines

drivers/gpu/drm/i915/i915_driver.c static int i915_driver_open(struct drm_device *dev, struct drm_file *file) · line 1076

Quoted 6 lines
drivers/gpu/drm/i915/i915_driver.c +3 -1
   static void i915_driver_lastclose(struct drm_device *dev)
   {
-    intel_fbdev_restore_mode(dev);
+    struct drm_i915_private *i915 = to_i915(dev);
+
+    intel_fbdev_restore_mode(i915);

You could use to_i915(dev) without alias.

Makes sense, I will resend.

Nirmoy

Quoted 9 lines

Regards
Andrzej

Quoted 2 lines
drivers/gpu/drm/i915/i915_driver.c +0 -0
 vga_switcheroo_process_delayed_switch();
   }