aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0727-drm-amd-dal-Split-encoder_types-into-link-and-stream.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0727-drm-amd-dal-Split-encoder_types-into-link-and-stream.patch')
-rw-r--r--common/recipes-kernel/linux/files/0727-drm-amd-dal-Split-encoder_types-into-link-and-stream.patch317
1 files changed, 317 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0727-drm-amd-dal-Split-encoder_types-into-link-and-stream.patch b/common/recipes-kernel/linux/files/0727-drm-amd-dal-Split-encoder_types-into-link-and-stream.patch
new file mode 100644
index 00000000..3c0f2702
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0727-drm-amd-dal-Split-encoder_types-into-link-and-stream.patch
@@ -0,0 +1,317 @@
+From ab0ebdeda2007e1f288f3585f1e0e227034f8840 Mon Sep 17 00:00:00 2001
+From: Jordan Lazare <Jordan.Lazare@amd.com>
+Date: Fri, 22 Jan 2016 15:43:46 -0500
+Subject: [PATCH 0727/1110] drm/amd/dal: Split encoder_types into link and
+ stream
+
+Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+---
+ drivers/gpu/drm/amd/dal/dc/inc/core_types.h | 5 +-
+ drivers/gpu/drm/amd/dal/dc/inc/encoder_types.h | 129 ---------------------
+ drivers/gpu/drm/amd/dal/dc/inc/link_encoder.h | 55 ++++++++-
+ drivers/gpu/drm/amd/dal/dc/inc/stream_encoder.h | 39 ++++++-
+ .../gpu/drm/amd/dal/include/bios_parser_types.h | 1 +
+ drivers/gpu/drm/amd/dal/include/signal_types.h | 2 +
+ 6 files changed, 97 insertions(+), 134 deletions(-)
+ delete mode 100644 drivers/gpu/drm/amd/dal/dc/inc/encoder_types.h
+
+diff --git a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
+index 1597b33..b0654ca 100644
+--- a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
++++ b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
+@@ -64,9 +64,12 @@ void enable_surface_flip_reporting(struct dc_surface *dc_surface,
+
+ /********* core_stream ************/
+ #include "grph_object_id.h"
+-#include "encoder_types.h"
++#include "link_encoder.h"
++#include "stream_encoder.h"
+ #include "clock_source_interface.h"
+ #include "audio_interface.h"
++#include "scaler_types.h"
++#include "hw_sequencer_types.h"
+
+ #define DC_STREAM_TO_CORE(dc_stream) container_of( \
+ dc_stream, struct core_stream, public)
+diff --git a/drivers/gpu/drm/amd/dal/dc/inc/encoder_types.h b/drivers/gpu/drm/amd/dal/dc/inc/encoder_types.h
+deleted file mode 100644
+index 7f3b9ad..0000000
+--- a/drivers/gpu/drm/amd/dal/dc/inc/encoder_types.h
++++ /dev/null
+@@ -1,129 +0,0 @@
+-/*
+- * Copyright 2012-15 Advanced Micro Devices, Inc.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+- * OTHER DEALINGS IN THE SOFTWARE.
+- *
+- * Authors: AMD
+- *
+- */
+-
+-#ifndef __DAL_ENCODER_TYPES_H__
+-#define __DAL_ENCODER_TYPES_H__
+-
+-#include "grph_object_defs.h"
+-#include "signal_types.h"
+-#include "hw_sequencer_types.h"
+-#include "link_service_types.h"
+-
+-struct encoder_init_data {
+- struct adapter_service *adapter_service;
+- enum channel_id channel;
+- struct graphics_object_id connector;
+- enum hpd_source_id hpd_source;
+- /* TODO: in DAL2, here was pointer to EventManagerInterface */
+- struct graphics_object_id encoder;
+- struct dc_context *ctx;
+- enum transmitter transmitter;
+-};
+-
+-struct encoder_context {
+- /*
+- * HW programming context
+- */
+- /* DIG id. Also used as AC context */
+- enum engine_id engine;
+- /* DDC line */
+- enum channel_id channel;
+- /* HPD line */
+- enum hpd_source_id hpd_source;
+- /*
+- * ASIC Control (VBIOS) context
+- */
+- /* encoder output signal */
+- enum signal_type signal;
+- /* native connector id */
+- struct graphics_object_id connector;
+- /* downstream object (can be connector or downstream encoder) */
+- struct graphics_object_id downstream;
+-};
+-
+-struct encoder_info_packet {
+- bool valid;
+- uint8_t hb0;
+- uint8_t hb1;
+- uint8_t hb2;
+- uint8_t hb3;
+- uint8_t sb[28];
+-};
+-
+-struct encoder_info_frame {
+- /* auxiliary video information */
+- struct encoder_info_packet avi;
+- struct encoder_info_packet gamut;
+- struct encoder_info_packet vendor;
+- /* source product description */
+- struct encoder_info_packet spd;
+- /* video stream configuration */
+- struct encoder_info_packet vsc;
+-};
+-
+-struct encoder_unblank_param {
+- struct hw_crtc_timing crtc_timing;
+- struct link_settings link_settings;
+-};
+-
+-struct encoder_set_dp_phy_pattern_param {
+- enum dp_test_pattern dp_phy_pattern;
+- const uint8_t *custom_pattern;
+- uint32_t custom_pattern_size;
+- enum dp_panel_mode dp_panel_mode;
+-};
+-
+-struct encoder_feature_support {
+- union {
+- struct {
+- /* 1 - external encoder; 0 - internal encoder */
+- uint32_t EXTERNAL_ENCODER:1;
+- uint32_t ANALOG_ENCODER:1;
+- uint32_t STEREO_SYNC:1;
+- /* check the DDC data pin
+- * when performing DP Sink detection */
+- uint32_t DP_SINK_DETECT_POLL_DATA_PIN:1;
+- /* CPLIB authentication
+- * for external DP chip supported */
+- uint32_t CPLIB_DP_AUTHENTICATION:1;
+- uint32_t IS_HBR2_CAPABLE:1;
+- uint32_t IS_HBR2_VALIDATED:1;
+- uint32_t IS_TPS3_CAPABLE:1;
+- uint32_t IS_AUDIO_CAPABLE:1;
+- uint32_t IS_VCE_SUPPORTED:1;
+- uint32_t IS_CONVERTER:1;
+- uint32_t IS_Y_ONLY_CAPABLE:1;
+- uint32_t IS_YCBCR_CAPABLE:1;
+- } bits;
+- uint32_t raw;
+- } flags;
+- /* maximum supported deep color depth */
+- enum dc_color_depth max_deep_color;
+- /* maximum supported clock */
+- uint32_t max_pixel_clock;
+-};
+-
+-#endif
+-
+diff --git a/drivers/gpu/drm/amd/dal/dc/inc/link_encoder.h b/drivers/gpu/drm/amd/dal/dc/inc/link_encoder.h
+index 23920e1..df9019a 100644
+--- a/drivers/gpu/drm/amd/dal/dc/inc/link_encoder.h
++++ b/drivers/gpu/drm/amd/dal/dc/inc/link_encoder.h
+@@ -8,8 +8,59 @@
+ #ifndef LINK_ENCODER_H_
+ #define LINK_ENCODER_H_
+
+-#include "core_types.h"
+-#include "encoder_types.h"
++#include "dal_services_types.h"
++#include "grph_object_defs.h"
++#include "signal_types.h"
++#include "dc_types.h"
++
++struct dc_context;
++struct adapter_service;
++struct encoder_set_dp_phy_pattern_param;
++struct link_mst_stream_allocation_table;
++struct link_settings;
++struct link_training_settings;
++struct core_stream;
++
++struct encoder_init_data {
++ struct adapter_service *adapter_service;
++ enum channel_id channel;
++ struct graphics_object_id connector;
++ enum hpd_source_id hpd_source;
++ /* TODO: in DAL2, here was pointer to EventManagerInterface */
++ struct graphics_object_id encoder;
++ struct dc_context *ctx;
++ enum transmitter transmitter;
++};
++
++struct encoder_feature_support {
++ union {
++ struct {
++ /* 1 - external encoder; 0 - internal encoder */
++ uint32_t EXTERNAL_ENCODER:1;
++ uint32_t ANALOG_ENCODER:1;
++ uint32_t STEREO_SYNC:1;
++ /* check the DDC data pin
++ * when performing DP Sink detection */
++ uint32_t DP_SINK_DETECT_POLL_DATA_PIN:1;
++ /* CPLIB authentication
++ * for external DP chip supported */
++ uint32_t CPLIB_DP_AUTHENTICATION:1;
++ uint32_t IS_HBR2_CAPABLE:1;
++ uint32_t IS_HBR2_VALIDATED:1;
++ uint32_t IS_TPS3_CAPABLE:1;
++ uint32_t IS_AUDIO_CAPABLE:1;
++ uint32_t IS_VCE_SUPPORTED:1;
++ uint32_t IS_CONVERTER:1;
++ uint32_t IS_Y_ONLY_CAPABLE:1;
++ uint32_t IS_YCBCR_CAPABLE:1;
++ } bits;
++ uint32_t raw;
++ } flags;
++ /* maximum supported deep color depth */
++ enum dc_color_depth max_deep_color;
++ /* maximum supported clock */
++ uint32_t max_pixel_clock;
++};
+
+ struct link_enc_status {
+ int dummy; /*TODO*/
+diff --git a/drivers/gpu/drm/amd/dal/dc/inc/stream_encoder.h b/drivers/gpu/drm/amd/dal/dc/inc/stream_encoder.h
+index 3de1f80..6bb1d00 100644
+--- a/drivers/gpu/drm/amd/dal/dc/inc/stream_encoder.h
++++ b/drivers/gpu/drm/amd/dal/dc/inc/stream_encoder.h
+@@ -6,10 +6,45 @@
+ #ifndef STREAM_ENCODER_H_
+ #define STREAM_ENCODER_H_
+
+-#include "encoder_types.h"
+-#include "include/bios_parser_interface.h"
++#include "include/hw_sequencer_types.h"
+
+ struct dc_bios;
++struct dc_context;
++struct dc_crtc_timing;
++
++
++struct encoder_info_packet {
++ bool valid;
++ uint8_t hb0;
++ uint8_t hb1;
++ uint8_t hb2;
++ uint8_t hb3;
++ uint8_t sb[28];
++};
++
++struct encoder_info_frame {
++ /* auxiliary video information */
++ struct encoder_info_packet avi;
++ struct encoder_info_packet gamut;
++ struct encoder_info_packet vendor;
++ /* source product description */
++ struct encoder_info_packet spd;
++ /* video stream configuration */
++ struct encoder_info_packet vsc;
++};
++
++struct encoder_unblank_param {
++ struct hw_crtc_timing crtc_timing;
++ struct link_settings link_settings;
++};
++
++struct encoder_set_dp_phy_pattern_param {
++ enum dp_test_pattern dp_phy_pattern;
++ const uint8_t *custom_pattern;
++ uint32_t custom_pattern_size;
++ enum dp_panel_mode dp_panel_mode;
++};
++
+
+ struct stream_encoder {
+ struct stream_encoder_funcs *funcs;
+diff --git a/drivers/gpu/drm/amd/dal/include/bios_parser_types.h b/drivers/gpu/drm/amd/dal/include/bios_parser_types.h
+index b4b93c6..6f72e25 100644
+--- a/drivers/gpu/drm/amd/dal/include/bios_parser_types.h
++++ b/drivers/gpu/drm/amd/dal/include/bios_parser_types.h
+@@ -30,6 +30,7 @@
+ #include "include/grph_object_ctrl_defs.h"
+ #include "include/gpio_types.h"
+ #include "include/adapter_service_types.h" /* for as_signal_type */
++#include "include/link_service_types.h"
+
+ enum bp_result {
+ BP_RESULT_OK = 0, /* There was no error */
+diff --git a/drivers/gpu/drm/amd/dal/include/signal_types.h b/drivers/gpu/drm/amd/dal/include/signal_types.h
+index a50f7ed..827c316 100644
+--- a/drivers/gpu/drm/amd/dal/include/signal_types.h
++++ b/drivers/gpu/drm/amd/dal/include/signal_types.h
+@@ -26,6 +26,8 @@
+ #ifndef __DC_SIGNAL_TYPES_H__
+ #define __DC_SIGNAL_TYPES_H__
+
++#include "dal_services_types.h"
++
+ enum signal_type {
+ SIGNAL_TYPE_NONE = 0L, /* no signal */
+ SIGNAL_TYPE_DVI_SINGLE_LINK = (1 << 0),
+--
+2.7.4
+