LCOV - code coverage report
Current view: top level - drivers/gpu/drm/amd/display/dc/virtual - virtual_stream_encoder.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 49 0.0 %
Date: 2022-12-09 01:23:36 Functions: 0 19 0.0 %

          Line data    Source code
       1             : /*
       2             :  * Copyright 2012-15 Advanced Micro Devices, Inc.
       3             :  *
       4             :  * Permission is hereby granted, free of charge, to any person obtaining a
       5             :  * copy of this software and associated documentation files (the "Software"),
       6             :  * to deal in the Software without restriction, including without limitation
       7             :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
       8             :  * and/or sell copies of the Software, and to permit persons to whom the
       9             :  * Software is furnished to do so, subject to the following conditions:
      10             :  *
      11             :  * The above copyright notice and this permission notice shall be included in
      12             :  * all copies or substantial portions of the Software.
      13             :  *
      14             :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      15             :  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      16             :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
      17             :  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
      18             :  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
      19             :  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
      20             :  * OTHER DEALINGS IN THE SOFTWARE.
      21             :  *
      22             :  * Authors: AMD
      23             :  *
      24             :  */
      25             : 
      26             : #include "dm_services.h"
      27             : #include "virtual_stream_encoder.h"
      28             : 
      29           0 : static void virtual_stream_encoder_dp_set_stream_attribute(
      30             :         struct stream_encoder *enc,
      31             :         struct dc_crtc_timing *crtc_timing,
      32             :         enum dc_color_space output_color_space,
      33             :         bool use_vsc_sdp_for_colorimetry,
      34           0 :         uint32_t enable_sdp_splitting) {}
      35             : 
      36           0 : static void virtual_stream_encoder_hdmi_set_stream_attribute(
      37             :         struct stream_encoder *enc,
      38             :         struct dc_crtc_timing *crtc_timing,
      39             :         int actual_pix_clk_khz,
      40           0 :         bool enable_audio) {}
      41             : 
      42           0 : static void virtual_stream_encoder_dvi_set_stream_attribute(
      43             :         struct stream_encoder *enc,
      44             :         struct dc_crtc_timing *crtc_timing,
      45           0 :         bool is_dual_link) {}
      46             : 
      47           0 : static void virtual_stream_encoder_set_throttled_vcp_size(
      48             :         struct stream_encoder *enc,
      49             :         struct fixed31_32 avg_time_slots_per_mtp)
      50           0 : {}
      51             : 
      52           0 : static void virtual_stream_encoder_update_hdmi_info_packets(
      53             :         struct stream_encoder *enc,
      54           0 :         const struct encoder_info_frame *info_frame) {}
      55             : 
      56           0 : static void virtual_stream_encoder_stop_hdmi_info_packets(
      57           0 :         struct stream_encoder *enc) {}
      58             : 
      59           0 : static void virtual_stream_encoder_set_avmute(
      60             :         struct stream_encoder *enc,
      61           0 :         bool enable) {}
      62           0 : static void virtual_stream_encoder_update_dp_info_packets(
      63             :         struct stream_encoder *enc,
      64           0 :         const struct encoder_info_frame *info_frame) {}
      65             : 
      66           0 : static void virtual_stream_encoder_stop_dp_info_packets(
      67           0 :         struct stream_encoder *enc) {}
      68             : 
      69           0 : static void virtual_stream_encoder_dp_blank(
      70             :         struct dc_link *link,
      71           0 :         struct stream_encoder *enc) {}
      72             : 
      73           0 : static void virtual_stream_encoder_dp_unblank(
      74             :         struct dc_link *link,
      75             :         struct stream_encoder *enc,
      76           0 :         const struct encoder_unblank_param *param) {}
      77             : 
      78           0 : static void virtual_audio_mute_control(
      79             :         struct stream_encoder *enc,
      80           0 :         bool mute) {}
      81             : 
      82           0 : static void virtual_stream_encoder_reset_hdmi_stream_attribute(
      83             :                 struct stream_encoder *enc)
      84           0 : {}
      85             : 
      86           0 : static void virtual_enc_dp_set_odm_combine(
      87             :         struct stream_encoder *enc,
      88             :         bool odm_combine)
      89           0 : {}
      90             : 
      91           0 : static void virtual_dig_connect_to_otg(
      92             :                 struct stream_encoder *enc,
      93             :                 int tg_inst)
      94           0 : {}
      95             : 
      96           0 : static void virtual_setup_stereo_sync(
      97             :                         struct stream_encoder *enc,
      98             :                         int tg_inst,
      99             :                         bool enable)
     100           0 : {}
     101             : 
     102           0 : static void virtual_stream_encoder_set_dsc_pps_info_packet(
     103             :                 struct stream_encoder *enc,
     104             :                 bool enable,
     105             :                 uint8_t *dsc_packed_pps,
     106             :                 bool immediate_update)
     107           0 : {}
     108             : 
     109             : static const struct stream_encoder_funcs virtual_str_enc_funcs = {
     110             :         .dp_set_odm_combine =
     111             :                 virtual_enc_dp_set_odm_combine,
     112             :         .dp_set_stream_attribute =
     113             :                 virtual_stream_encoder_dp_set_stream_attribute,
     114             :         .hdmi_set_stream_attribute =
     115             :                 virtual_stream_encoder_hdmi_set_stream_attribute,
     116             :         .dvi_set_stream_attribute =
     117             :                 virtual_stream_encoder_dvi_set_stream_attribute,
     118             :         .set_throttled_vcp_size =
     119             :                 virtual_stream_encoder_set_throttled_vcp_size,
     120             :         .update_hdmi_info_packets =
     121             :                 virtual_stream_encoder_update_hdmi_info_packets,
     122             :         .stop_hdmi_info_packets =
     123             :                 virtual_stream_encoder_stop_hdmi_info_packets,
     124             :         .update_dp_info_packets =
     125             :                 virtual_stream_encoder_update_dp_info_packets,
     126             :         .stop_dp_info_packets =
     127             :                 virtual_stream_encoder_stop_dp_info_packets,
     128             :         .dp_blank =
     129             :                 virtual_stream_encoder_dp_blank,
     130             :         .dp_unblank =
     131             :                 virtual_stream_encoder_dp_unblank,
     132             : 
     133             :         .audio_mute_control = virtual_audio_mute_control,
     134             :         .set_avmute = virtual_stream_encoder_set_avmute,
     135             :         .hdmi_reset_stream_attribute = virtual_stream_encoder_reset_hdmi_stream_attribute,
     136             :         .dig_connect_to_otg = virtual_dig_connect_to_otg,
     137             :         .setup_stereo_sync = virtual_setup_stereo_sync,
     138             :         .dp_set_dsc_pps_info_packet = virtual_stream_encoder_set_dsc_pps_info_packet,
     139             : };
     140             : 
     141           0 : bool virtual_stream_encoder_construct(
     142             :         struct stream_encoder *enc,
     143             :         struct dc_context *ctx,
     144             :         struct dc_bios *bp)
     145             : {
     146           0 :         if (!enc)
     147             :                 return false;
     148           0 :         if (!bp)
     149             :                 return false;
     150             : 
     151           0 :         enc->funcs = &virtual_str_enc_funcs;
     152           0 :         enc->ctx = ctx;
     153           0 :         enc->id = ENGINE_ID_VIRTUAL;
     154           0 :         enc->bp = bp;
     155             : 
     156           0 :         return true;
     157             : }
     158             : 
     159           0 : struct stream_encoder *virtual_stream_encoder_create(
     160             :         struct dc_context *ctx, struct dc_bios *bp)
     161             : {
     162           0 :         struct stream_encoder *enc = kzalloc(sizeof(*enc), GFP_KERNEL);
     163             : 
     164           0 :         if (!enc)
     165             :                 return NULL;
     166             : 
     167           0 :         if (virtual_stream_encoder_construct(enc, ctx, bp))
     168             :                 return enc;
     169             : 
     170           0 :         BREAK_TO_DEBUGGER();
     171           0 :         kfree(enc);
     172           0 :         return NULL;
     173             : }
     174             : 

Generated by: LCOV version 1.14