Skip to contentSkip to conversation

drm/sti: load HQVDP firmware the first time HQVDP's plane is used

PATCH In review Vincent Abriou 2 participants 3 messages Nov 2, 2015 – Nov 4, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/sti: load HQVDP firmware the first time HQVDP's plane is used

The way to load the HQVDP firmware has been updated.
HQVDP firmware is now loaded the first time an HQVDP plane is used and no more when the HQVDP driver is bound.
This solves the dependency we had on the file system availability. The first time the HQVDP plane is used, we are sure that file system is available so request_firmware function will match.

CONFIG_FW_LOADER_USER_HELPER_FALLBACK is then no more mandatory.

---
 drivers/gpu/drm/sti/Kconfig     |   1 -
 drivers/gpu/drm/sti/sti_hqvdp.c | 302 ++++++++++++++++++++--------------------
 2 files changed, 150 insertions(+), 153 deletions(-)
drivers/gpu/drm/sti/Kconfig +0 -1
index 3f8d590..10c1b19 100644
@@ -7,6 +7,5 @@ config DRM_STI
 	select DRM_KMS_CMA_HELPER
 	select DRM_PANEL
 	select FW_LOADER
-	select FW_LOADER_USER_HELPER_FALLBACK
 	help
 	  Choose this option to enable DRM on STM stiH41x chipset
drivers/gpu/drm/sti/sti_hqvdp.c +150 -152

330 lines not on this page · raw message

Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hi Vincent,

drivers/gpu/drm/sti/sti_hqvdp.c static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane, · line 906

Quoted 7 lines · Vincent Abriou
drivers/gpu/drm/sti/sti_hqvdp.c +3 -0
@@ -754,6 +901,9 @@ static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane,
        sti_hqvdp_update_hvsrc(HVSRC_VERT, scale_v, &cmd->hvsrc);
 
        if (first_prepare) {
+               /* Start HQVDP XP70 coprocessor */
+               sti_hqvdp_start_xp70(hqvdp);
+

Shouldn't one check for things such as this (and sti_hqvdp_check_hw_scaling, amongst other things) in atomic_check() ? Mostl/all other drivers seems to do so. After all drm core check()s and if everything/state is ok then calls update().

Regards,
Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

Hi Emil,

Quoted 6 lines · Emil Velikov

Hi Vincent,

Quoted 3 lines · Vincent Abriou
drivers/gpu/drm/sti/sti_hqvdp.c +0 -0
@@ -754,6 +901,9 @@ static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane,
         sti_hqvdp_update_hvsrc(HVSRC_VERT, scale_v, &cmd->hvsrc);
 
Quoted 9 lines

drivers/gpu/drm/sti/sti_hqvdp.c static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane, · line 906

Quoted 4 lines
drivers/gpu/drm/sti/sti_hqvdp.c +3 -0
         if (first_prepare) {
+               /* Start HQVDP XP70 coprocessor */
+               sti_hqvdp_start_xp70(hqvdp);
+

Shouldn't one check for things such as this (and sti_hqvdp_check_hw_scaling, amongst other things) in atomic_check() ? Mostl/all other drivers seems to do so. After all drm core check()s and if everything/state is ok then calls update().

Thanks to highlight me this point.
Atomic has been newly introduced in our sti driver and we updated our driver in a straightforward way to make it work with atomic leaving aside such point.

I will trig a rework for this for the next update of our driver taking into account atomic_check for planes management.

Regards
Vincent

Quoted 3 lines

Regards,
Emil

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel