Back to home page

OSCL-LXR

 
 

    


0001 /* Copyright 2012-15 Advanced Micro Devices, Inc.
0002  *
0003  * Permission is hereby granted, free of charge, to any person obtaining a
0004  * copy of this software and associated documentation files (the "Software"),
0005  * to deal in the Software without restriction, including without limitation
0006  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0007  * and/or sell copies of the Software, and to permit persons to whom the
0008  * Software is furnished to do so, subject to the following conditions:
0009  *
0010  * The above copyright notice and this permission notice shall be included in
0011  * all copies or substantial portions of the Software.
0012  *
0013  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0014  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0015  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0016  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
0017  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0018  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0019  * OTHER DEALINGS IN THE SOFTWARE.
0020  *
0021  * Authors: AMD
0022  *
0023  */
0024 
0025 #ifndef __DC_COMPRESSOR_DCE112_H__
0026 #define __DC_COMPRESSOR_DCE112_H__
0027 
0028 #include "../inc/compressor.h"
0029 
0030 #define TO_DCE112_COMPRESSOR(compressor)\
0031     container_of(compressor, struct dce112_compressor, base)
0032 
0033 struct dce112_compressor_reg_offsets {
0034     uint32_t dcp_offset;
0035     uint32_t dmif_offset;
0036 };
0037 
0038 struct dce112_compressor {
0039     struct compressor base;
0040     struct dce112_compressor_reg_offsets offsets;
0041 };
0042 
0043 struct compressor *dce112_compressor_create(struct dc_context *ctx);
0044 
0045 void dce112_compressor_construct(struct dce112_compressor *cp110,
0046     struct dc_context *ctx);
0047 
0048 void dce112_compressor_destroy(struct compressor **cp);
0049 
0050 /* FBC RELATED */
0051 void dce112_compressor_power_up_fbc(struct compressor *cp);
0052 
0053 void dce112_compressor_enable_fbc(struct compressor *cp, uint32_t paths_num,
0054     struct compr_addr_and_pitch_params *params);
0055 
0056 void dce112_compressor_disable_fbc(struct compressor *cp);
0057 
0058 void dce112_compressor_set_fbc_invalidation_triggers(struct compressor *cp,
0059     uint32_t fbc_trigger);
0060 
0061 void dce112_compressor_program_compressed_surface_address_and_pitch(
0062     struct compressor *cp,
0063     struct compr_addr_and_pitch_params *params);
0064 
0065 bool dce112_compressor_is_fbc_enabled_in_hw(struct compressor *cp,
0066     uint32_t *fbc_mapped_crtc_id);
0067 
0068 /* LPT RELATED */
0069 void dce112_compressor_enable_lpt(struct compressor *cp);
0070 
0071 void dce112_compressor_disable_lpt(struct compressor *cp);
0072 
0073 void dce112_compressor_program_lpt_control(struct compressor *cp,
0074     struct compr_addr_and_pitch_params *params);
0075 
0076 bool dce112_compressor_is_lpt_enabled_in_hw(struct compressor *cp);
0077 
0078 #endif