11.1Sriastrad===============================================================================
21.1SriastradTODOs
31.1Sriastrad===============================================================================
41.1Sriastrad
51.1Sriastrad1. Base this on drm-next - WIP
61.1Sriastrad
71.1Sriastrad
81.1Sriastrad2. Cleanup commit history
91.1Sriastrad
101.1Sriastrad
111.1Sriastrad3. WIP - Drop page flip helper and use DRM's version
121.1Sriastrad
131.1Sriastrad
141.1Sriastrad4. DONE - Flatten all DC objects
151.1Sriastrad    * dc_stream/core_stream/stream should just be dc_stream
161.1Sriastrad    * Same for other DC objects
171.1Sriastrad
181.1Sriastrad    "Is there any major reason to keep all those abstractions?
191.1Sriastrad
201.1Sriastrad    Could you collapse everything into struct dc_stream?
211.1Sriastrad
221.1Sriastrad    I haven't looked recently but I didn't get the impression there was a
231.1Sriastrad    lot of design around what was public/protected, more whatever needed
241.1Sriastrad    to be used by someone else was in public."
251.1Sriastrad    ~ Dave Airlie
261.1Sriastrad
271.1Sriastrad
281.1Sriastrad5. DONE - Rename DC objects to align more with DRM
291.1Sriastrad    * dc_surface -> dc_plane_state
301.1Sriastrad    * dc_stream -> dc_stream_state
311.1Sriastrad
321.1Sriastrad
331.1Sriastrad6. DONE - Per-plane and per-stream validation
341.1Sriastrad
351.1Sriastrad
361.1Sriastrad7. WIP - Per-plane and per-stream commit
371.1Sriastrad
381.1Sriastrad
391.1Sriastrad8. WIP - Split pipe_ctx into plane and stream resource structs
401.1Sriastrad
411.1Sriastrad
421.1Sriastrad9. Attach plane and stream reources to state object instead of validate_context
431.1Sriastrad
441.1Sriastrad
451.1Sriastrad10. Remove dc_edid_caps and drm_helpers_parse_edid_caps
461.1Sriastrad    * Use drm_display_info instead
471.1Sriastrad    * Remove DC's edid quirks and rely on DRM's quirks (add quirks if needed)
481.1Sriastrad
491.1Sriastrad    "Making sure you use the sink-specific helper libraries and kernel
501.1Sriastrad    subsystems, since there's really no good reason to have 2nd
511.1Sriastrad    implementation of those in the kernel. Looks likes that's done for mst
521.1Sriastrad    and edid parsing. There's still a bit a midlayer feeling to the edid
531.1Sriastrad    parsing side (e.g. dc_edid_caps and dm_helpers_parse_edid_caps, I
541.1Sriastrad    think it'd be much better if you convert that over to reading stuff
551.1Sriastrad    from drm_display_info and if needed, push stuff into the core). Also,
561.1Sriastrad    I can't come up with a good reason why DC needs all this (except to
571.1Sriastrad    reimplement half of our edid quirk table, which really isn't a good
581.1Sriastrad    idea). Might be good if you put this onto the list of things to fix
591.1Sriastrad    long-term, but imo not a blocker. Definitely make sure new stuff
601.1Sriastrad    doesn't slip in (i.e. if you start adding edid quirks to DC instead of
611.1Sriastrad    the drm core, refactoring to use the core edid stuff was pointless)."
621.1Sriastrad    ~ Daniel Vetter
631.1Sriastrad
641.1Sriastrad
651.1Sriastrad11. Remove dc/i2caux. This folder can be somewhat misleading. It's basically an
661.1Sriastradovery complicated HW programming function for sendind and receiving i2c/aux
671.1Sriastradcommands. We can greatly simplify that and move it into dc/dceXYZ like other
681.1SriastradHW blocks.
691.1Sriastrad
701.1Sriastrad12. drm_modeset_lock in MST should no longer be needed in recent kernels
711.1Sriastrad    * Adopt appropriate locking scheme
721.1Sriastrad
731.1Sriastrad13. get_modes and best_encoder callbacks look a bit funny. Can probably rip out
741.1Sriastrada few indirections, and consider removing entirely and using the
751.1Sriastraddrm_atomic_helper_best_encoder default behaviour.
761.1Sriastrad
771.1Sriastrad14. core/dc_debug.c, consider switching to the atomic state debug helpers and
781.1Sriastradmoving all your driver state printing into the various atomic_print_state
791.1Sriastradcallbacks. There's also plans to expose this stuff in a standard way across all
801.1Sriastraddrivers, to make debugging userspace compositors easier across different hw.
811.1Sriastrad
821.1Sriastrad15. Move DP/HDMI dual mode adaptors to drm_dp_dual_mode_helper.c. See
831.1Sriastraddal_ddc_service_i2c_query_dp_dual_mode_adaptor.
841.1Sriastrad
851.1Sriastrad16. Move to core SCDC helpers (I think those are new since initial DC review).
861.1Sriastrad
871.1Sriastrad17. There's still a pretty massive layer cake around dp aux and DPCD handling,
881.1Sriastradwith like 3 levels of abstraction and using your own structures instead of the
891.1Sriastradstuff in drm_dp_helper.h. drm_dp_helper.h isn't really great and already has 2
901.1Sriastradincompatible styles, just means more reasons not to add a third (or well third
911.1Sriastradone gets to do the cleanup refactor).
921.1Sriastrad
931.1Sriastrad18. There's a pile of sink handling code, both for DP and HDMI where I didn't
941.1Sriastradimmediately recognize the standard. I think long term it'd be best for the drm
951.1Sriastradsubsystem if we try to move as much of that into helpers/core as possible, and
961.1Sriastradshare it with drivers. But that's a very long term goal, and by far not just an
971.1Sriastradissue with DC - other drivers, especially around DP sink handling, are equally
981.1Sriastradguilty.
991.1Sriastrad
1001.1Sriastrad19. DONE - The DC logger is still a rather sore thing, but I know that the
1011.1SriastradDRM_DEBUG stuff just isn't up to the challenges either. We need to figure out
1021.1Sriastradsomething that integrates better with DRM and linux debug printing, while not
1031.1Sriastradbeing useless with filtering output. dynamic debug printing might be an option.
1041.1Sriastrad
1051.1Sriastrad20. Use kernel i2c device to program HDMI retimer. Some boards have an HDMI
1061.1Sriastradretimer that we need to program to pass PHY compliance. Currently that's
1071.1Sriastradbypassing the i2c device and goes directly to HW. This should be changed.
1081.1Sriastrad
1091.1Sriastrad21. Remove vector.c from dc/basics. It's used in DDC code which can probably
1101.1Sriastradbe simplified enough to no longer need a vector implementation.
111