File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,8 +152,6 @@ enum drm_connector_status
152152tegra_output_connector_detect (struct drm_connector * connector , bool force );
153153void tegra_output_connector_destroy (struct drm_connector * connector );
154154
155- void tegra_output_encoder_destroy (struct drm_encoder * encoder );
156-
157155/* from dpaux.c */
158156struct drm_dp_aux * drm_dp_aux_find_by_of_node (struct device_node * np );
159157enum drm_connector_status drm_dp_aux_detect (struct drm_dp_aux * aux );
Original file line number Diff line number Diff line change 2222#include <drm/drm_file.h>
2323#include <drm/drm_mipi_dsi.h>
2424#include <drm/drm_panel.h>
25+ #include <drm/drm_simple_kms_helper.h>
2526
2627#include "dc.h"
2728#include "drm.h"
@@ -815,10 +816,6 @@ static const struct drm_connector_helper_funcs tegra_dsi_connector_helper_funcs
815816 .mode_valid = tegra_dsi_connector_mode_valid ,
816817};
817818
818- static const struct drm_encoder_funcs tegra_dsi_encoder_funcs = {
819- .destroy = tegra_output_encoder_destroy ,
820- };
821-
822819static void tegra_dsi_unprepare (struct tegra_dsi * dsi )
823820{
824821 int err ;
@@ -1049,9 +1046,8 @@ static int tegra_dsi_init(struct host1x_client *client)
10491046 & tegra_dsi_connector_helper_funcs );
10501047 dsi -> output .connector .dpms = DRM_MODE_DPMS_OFF ;
10511048
1052- drm_encoder_init (drm , & dsi -> output .encoder ,
1053- & tegra_dsi_encoder_funcs ,
1054- DRM_MODE_ENCODER_DSI , NULL );
1049+ drm_simple_encoder_init (drm , & dsi -> output .encoder ,
1050+ DRM_MODE_ENCODER_DSI );
10551051 drm_encoder_helper_add (& dsi -> output .encoder ,
10561052 & tegra_dsi_encoder_helper_funcs );
10571053
Original file line number Diff line number Diff line change 2222#include <drm/drm_file.h>
2323#include <drm/drm_fourcc.h>
2424#include <drm/drm_probe_helper.h>
25+ #include <drm/drm_simple_kms_helper.h>
2526
2627#include "hda.h"
2728#include "hdmi.h"
@@ -1127,10 +1128,6 @@ tegra_hdmi_connector_helper_funcs = {
11271128 .mode_valid = tegra_hdmi_connector_mode_valid ,
11281129};
11291130
1130- static const struct drm_encoder_funcs tegra_hdmi_encoder_funcs = {
1131- .destroy = tegra_output_encoder_destroy ,
1132- };
1133-
11341131static void tegra_hdmi_encoder_disable (struct drm_encoder * encoder )
11351132{
11361133 struct tegra_output * output = encoder_to_output (encoder );
@@ -1436,8 +1433,8 @@ static int tegra_hdmi_init(struct host1x_client *client)
14361433 & tegra_hdmi_connector_helper_funcs );
14371434 hdmi -> output .connector .dpms = DRM_MODE_DPMS_OFF ;
14381435
1439- drm_encoder_init (drm , & hdmi -> output .encoder , & tegra_hdmi_encoder_funcs ,
1440- DRM_MODE_ENCODER_TMDS , NULL );
1436+ drm_simple_encoder_init (drm , & hdmi -> output .encoder ,
1437+ DRM_MODE_ENCODER_TMDS );
14411438 drm_encoder_helper_add (& hdmi -> output .encoder ,
14421439 & tegra_hdmi_encoder_helper_funcs );
14431440
Original file line number Diff line number Diff line change 66
77#include <drm/drm_atomic_helper.h>
88#include <drm/drm_panel.h>
9+ #include <drm/drm_simple_kms_helper.h>
910
1011#include "drm.h"
1112#include "dc.h"
@@ -79,11 +80,6 @@ void tegra_output_connector_destroy(struct drm_connector *connector)
7980 drm_connector_cleanup (connector );
8081}
8182
82- void tegra_output_encoder_destroy (struct drm_encoder * encoder )
83- {
84- drm_encoder_cleanup (encoder );
85- }
86-
8783static irqreturn_t hpd_irq (int irq , void * data )
8884{
8985 struct tegra_output * output = data ;
Original file line number Diff line number Diff line change 88
99#include <drm/drm_atomic_helper.h>
1010#include <drm/drm_panel.h>
11+ #include <drm/drm_simple_kms_helper.h>
1112
1213#include "drm.h"
1314#include "dc.h"
@@ -110,10 +111,6 @@ static const struct drm_connector_helper_funcs tegra_rgb_connector_helper_funcs
110111 .mode_valid = tegra_rgb_connector_mode_valid ,
111112};
112113
113- static const struct drm_encoder_funcs tegra_rgb_encoder_funcs = {
114- .destroy = tegra_output_encoder_destroy ,
115- };
116-
117114static void tegra_rgb_encoder_disable (struct drm_encoder * encoder )
118115{
119116 struct tegra_output * output = encoder_to_output (encoder );
@@ -281,8 +278,7 @@ int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc)
281278 & tegra_rgb_connector_helper_funcs );
282279 output -> connector .dpms = DRM_MODE_DPMS_OFF ;
283280
284- drm_encoder_init (drm , & output -> encoder , & tegra_rgb_encoder_funcs ,
285- DRM_MODE_ENCODER_LVDS , NULL );
281+ drm_simple_encoder_init (drm , & output -> encoder , DRM_MODE_ENCODER_LVDS );
286282 drm_encoder_helper_add (& output -> encoder ,
287283 & tegra_rgb_encoder_helper_funcs );
288284
Original file line number Diff line number Diff line change 2323#include <drm/drm_file.h>
2424#include <drm/drm_panel.h>
2525#include <drm/drm_scdc_helper.h>
26+ #include <drm/drm_simple_kms_helper.h>
2627
2728#include "dc.h"
2829#include "dp.h"
@@ -1796,10 +1797,6 @@ static const struct drm_connector_helper_funcs tegra_sor_connector_helper_funcs
17961797 .mode_valid = tegra_sor_connector_mode_valid ,
17971798};
17981799
1799- static const struct drm_encoder_funcs tegra_sor_encoder_funcs = {
1800- .destroy = tegra_output_encoder_destroy ,
1801- };
1802-
18031800static int
18041801tegra_sor_encoder_atomic_check (struct drm_encoder * encoder ,
18051802 struct drm_crtc_state * crtc_state ,
@@ -3093,8 +3090,7 @@ static int tegra_sor_init(struct host1x_client *client)
30933090 & tegra_sor_connector_helper_funcs );
30943091 sor -> output .connector .dpms = DRM_MODE_DPMS_OFF ;
30953092
3096- drm_encoder_init (drm , & sor -> output .encoder , & tegra_sor_encoder_funcs ,
3097- encoder , NULL );
3093+ drm_simple_encoder_init (drm , & sor -> output .encoder , encoder );
30983094 drm_encoder_helper_add (& sor -> output .encoder , helpers );
30993095
31003096 drm_connector_attach_encoder (& sor -> output .connector ,
You can’t perform that action at this time.
0 commit comments