File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -2117,6 +2117,12 @@ static int tegra_dc_init(struct host1x_client *client)
2117
2117
if (dc -> soc -> pitch_align > tegra -> pitch_align )
2118
2118
tegra -> pitch_align = dc -> soc -> pitch_align ;
2119
2119
2120
+ /* track maximum resolution */
2121
+ if (dc -> soc -> has_nvdisplay )
2122
+ drm -> mode_config .max_width = drm -> mode_config .max_height = 16384 ;
2123
+ else
2124
+ drm -> mode_config .max_width = drm -> mode_config .max_height = 4096 ;
2125
+
2120
2126
err = tegra_dc_rgb_init (drm , dc );
2121
2127
if (err < 0 && err != - ENODEV ) {
2122
2128
dev_err (dc -> dev , "failed to initialize RGB output: %d\n" , err );
Original file line number Diff line number Diff line change @@ -1121,9 +1121,8 @@ static int host1x_drm_probe(struct host1x_device *dev)
1121
1121
1122
1122
drm -> mode_config .min_width = 0 ;
1123
1123
drm -> mode_config .min_height = 0 ;
1124
-
1125
- drm -> mode_config .max_width = 4096 ;
1126
- drm -> mode_config .max_height = 4096 ;
1124
+ drm -> mode_config .max_width = 0 ;
1125
+ drm -> mode_config .max_height = 0 ;
1127
1126
1128
1127
drm -> mode_config .allow_fb_modifiers = true;
1129
1128
@@ -1142,6 +1141,14 @@ static int host1x_drm_probe(struct host1x_device *dev)
1142
1141
if (err < 0 )
1143
1142
goto fbdev ;
1144
1143
1144
+ /*
1145
+ * Now that all display controller have been initialized, the maximum
1146
+ * supported resolution is known and the bitmask for horizontal and
1147
+ * vertical bitfields can be computed.
1148
+ */
1149
+ tegra -> hmask = drm -> mode_config .max_width - 1 ;
1150
+ tegra -> vmask = drm -> mode_config .max_height - 1 ;
1151
+
1145
1152
if (tegra -> use_explicit_iommu ) {
1146
1153
u64 carveout_start , carveout_end , gem_start , gem_end ;
1147
1154
u64 dma_mask = dma_get_mask (& dev -> dev );
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ struct tegra_drm {
54
54
struct tegra_fbdev * fbdev ;
55
55
#endif
56
56
57
+ unsigned int hmask , vmask ;
57
58
unsigned int pitch_align ;
58
59
59
60
struct tegra_display_hub * hub ;
You can’t perform that action at this time.
0 commit comments