The TV will be connected with HDMI and computer will have its DisplayPort converted to HDMI by a supported adapter. But:
most adapters do not support the CEC Tunneling feature, and of those that do many did not actually connect the CEC pin. Unfortunately, this means that while a CEC device is created, it is actually all alone in the world and will never be able to see other CEC devices.
DisplayPort to HDMI Adapters with working CEC
HDMI-CEC Tunneling over DisplayPort | Arch Wiki
TL;DR
Connect your computer's DisplayPort with DP-HDMI adapter to TV's HDMI. To test if the adapter tunnels CEC, run in a terminal:
cec-ctl --playback && cec-ctl -S
Which should show at least two devices.