1*4882a593Smuzhiyun=============================================================================== 2*4882a593SmuzhiyunTODOs 3*4882a593Smuzhiyun=============================================================================== 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun1. Base this on drm-next - WIP 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun2. Cleanup commit history 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun3. WIP - Drop page flip helper and use DRM's version 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun4. DONE - Flatten all DC objects 15*4882a593Smuzhiyun * dc_stream/core_stream/stream should just be dc_stream 16*4882a593Smuzhiyun * Same for other DC objects 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun "Is there any major reason to keep all those abstractions? 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun Could you collapse everything into struct dc_stream? 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun I haven't looked recently but I didn't get the impression there was a 23*4882a593Smuzhiyun lot of design around what was public/protected, more whatever needed 24*4882a593Smuzhiyun to be used by someone else was in public." 25*4882a593Smuzhiyun ~ Dave Airlie 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun5. DONE - Rename DC objects to align more with DRM 29*4882a593Smuzhiyun * dc_surface -> dc_plane_state 30*4882a593Smuzhiyun * dc_stream -> dc_stream_state 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun6. DONE - Per-plane and per-stream validation 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun7. WIP - Per-plane and per-stream commit 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun8. WIP - Split pipe_ctx into plane and stream resource structs 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun9. Attach plane and stream reources to state object instead of validate_context 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun10. Remove dc_edid_caps and drm_helpers_parse_edid_caps 46*4882a593Smuzhiyun * Use drm_display_info instead 47*4882a593Smuzhiyun * Remove DC's edid quirks and rely on DRM's quirks (add quirks if needed) 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun "Making sure you use the sink-specific helper libraries and kernel 50*4882a593Smuzhiyun subsystems, since there's really no good reason to have 2nd 51*4882a593Smuzhiyun implementation of those in the kernel. Looks likes that's done for mst 52*4882a593Smuzhiyun and edid parsing. There's still a bit a midlayer feeling to the edid 53*4882a593Smuzhiyun parsing side (e.g. dc_edid_caps and dm_helpers_parse_edid_caps, I 54*4882a593Smuzhiyun think it'd be much better if you convert that over to reading stuff 55*4882a593Smuzhiyun from drm_display_info and if needed, push stuff into the core). Also, 56*4882a593Smuzhiyun I can't come up with a good reason why DC needs all this (except to 57*4882a593Smuzhiyun reimplement half of our edid quirk table, which really isn't a good 58*4882a593Smuzhiyun idea). Might be good if you put this onto the list of things to fix 59*4882a593Smuzhiyun long-term, but imo not a blocker. Definitely make sure new stuff 60*4882a593Smuzhiyun doesn't slip in (i.e. if you start adding edid quirks to DC instead of 61*4882a593Smuzhiyun the drm core, refactoring to use the core edid stuff was pointless)." 62*4882a593Smuzhiyun ~ Daniel Vetter 63*4882a593Smuzhiyun 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun11. Remove dc/i2caux. This folder can be somewhat misleading. It's basically an 66*4882a593Smuzhiyunovery complicated HW programming function for sendind and receiving i2c/aux 67*4882a593Smuzhiyuncommands. We can greatly simplify that and move it into dc/dceXYZ like other 68*4882a593SmuzhiyunHW blocks. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun12. drm_modeset_lock in MST should no longer be needed in recent kernels 71*4882a593Smuzhiyun * Adopt appropriate locking scheme 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun13. get_modes and best_encoder callbacks look a bit funny. Can probably rip out 74*4882a593Smuzhiyuna few indirections, and consider removing entirely and using the 75*4882a593Smuzhiyundrm_atomic_helper_best_encoder default behaviour. 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun14. core/dc_debug.c, consider switching to the atomic state debug helpers and 78*4882a593Smuzhiyunmoving all your driver state printing into the various atomic_print_state 79*4882a593Smuzhiyuncallbacks. There's also plans to expose this stuff in a standard way across all 80*4882a593Smuzhiyundrivers, to make debugging userspace compositors easier across different hw. 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun15. Move DP/HDMI dual mode adaptors to drm_dp_dual_mode_helper.c. See 83*4882a593Smuzhiyundal_ddc_service_i2c_query_dp_dual_mode_adaptor. 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun16. Move to core SCDC helpers (I think those are new since initial DC review). 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun17. There's still a pretty massive layer cake around dp aux and DPCD handling, 88*4882a593Smuzhiyunwith like 3 levels of abstraction and using your own structures instead of the 89*4882a593Smuzhiyunstuff in drm_dp_helper.h. drm_dp_helper.h isn't really great and already has 2 90*4882a593Smuzhiyunincompatible styles, just means more reasons not to add a third (or well third 91*4882a593Smuzhiyunone gets to do the cleanup refactor). 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun18. There's a pile of sink handling code, both for DP and HDMI where I didn't 94*4882a593Smuzhiyunimmediately recognize the standard. I think long term it'd be best for the drm 95*4882a593Smuzhiyunsubsystem if we try to move as much of that into helpers/core as possible, and 96*4882a593Smuzhiyunshare it with drivers. But that's a very long term goal, and by far not just an 97*4882a593Smuzhiyunissue with DC - other drivers, especially around DP sink handling, are equally 98*4882a593Smuzhiyunguilty. 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun19. DONE - The DC logger is still a rather sore thing, but I know that the 101*4882a593SmuzhiyunDRM_DEBUG stuff just isn't up to the challenges either. We need to figure out 102*4882a593Smuzhiyunsomething that integrates better with DRM and linux debug printing, while not 103*4882a593Smuzhiyunbeing useless with filtering output. dynamic debug printing might be an option. 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun20. Use kernel i2c device to program HDMI retimer. Some boards have an HDMI 106*4882a593Smuzhiyunretimer that we need to program to pass PHY compliance. Currently that's 107*4882a593Smuzhiyunbypassing the i2c device and goes directly to HW. This should be changed. 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun21. Remove vector.c from dc/basics. It's used in DDC code which can probably 110*4882a593Smuzhiyunbe simplified enough to no longer need a vector implementation. 111