hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
....@@ -38,7 +38,7 @@
3838 #include <drm/drm_crtc_helper.h>
3939 #include <drm/drm_fb_helper.h>
4040 #include <drm/drm_plane_helper.h>
41
-#include <drm/drm_fb_helper.h>
41
+#include <drm/drm_probe_helper.h>
4242 #include <linux/i2c.h>
4343 #include <linux/i2c-algo-bit.h>
4444 #include <linux/hrtimer.h>
....@@ -46,6 +46,7 @@
4646
4747 #include <drm/drm_dp_mst_helper.h>
4848 #include "modules/inc/mod_freesync.h"
49
+#include "amdgpu_dm_irq_params.h"
4950
5051 struct amdgpu_bo;
5152 struct amdgpu_device;
....@@ -57,9 +58,8 @@
5758 #define to_amdgpu_connector(x) container_of(x, struct amdgpu_connector, base)
5859 #define to_amdgpu_encoder(x) container_of(x, struct amdgpu_encoder, base)
5960 #define to_amdgpu_framebuffer(x) container_of(x, struct amdgpu_framebuffer, base)
60
-#define to_amdgpu_plane(x) container_of(x, struct amdgpu_plane, base)
6161
62
-#define to_dm_plane_state(x) container_of(x, struct dm_plane_state, base);
62
+#define to_dm_plane_state(x) container_of(x, struct dm_plane_state, base)
6363
6464 #define AMDGPU_MAX_HPD_PINS 6
6565 #define AMDGPU_MAX_CRTCS 6
....@@ -295,13 +295,6 @@
295295 uint16_t connector_object_id,
296296 struct amdgpu_hpd *hpd,
297297 struct amdgpu_router *router);
298
- /* it is used to enter or exit into free sync mode */
299
- int (*notify_freesync)(struct drm_device *dev, void *data,
300
- struct drm_file *filp);
301
- /* it is used to allow enablement of freesync mode */
302
- int (*set_freesync_property)(struct drm_connector *connector,
303
- struct drm_property *property,
304
- uint64_t val);
305298
306299
307300 };
....@@ -325,7 +318,7 @@
325318 struct card_info *atom_card_info;
326319 bool mode_config_initialized;
327320 struct amdgpu_crtc *crtcs[AMDGPU_MAX_CRTCS];
328
- struct amdgpu_plane *planes[AMDGPU_MAX_PLANES];
321
+ struct drm_plane *planes[AMDGPU_MAX_PLANES];
329322 struct amdgpu_afmt *afmt[AMDGPU_MAX_AFMT_BLOCKS];
330323 /* DVI-I properties */
331324 struct drm_property *coherent_mode_property;
....@@ -339,8 +332,8 @@
339332 struct drm_property *audio_property;
340333 /* FMT dithering */
341334 struct drm_property *dither_property;
342
- /* maximum number of bits per channel for monitor color */
343
- struct drm_property *max_bpc_property;
335
+ /* Adaptive Backlight Modulation (power feature) */
336
+ struct drm_property *abm_level_property;
344337 /* hardcoded DFP edid from BIOS */
345338 struct edid *bios_hardcoded_edid;
346339 int bios_hardcoded_edid_size;
....@@ -412,6 +405,8 @@
412405 struct amdgpu_flip_work *pflip_works;
413406 enum amdgpu_flip_status pflip_status;
414407 int deferred_flip_completion;
408
+ /* parameters access from DM IRQ handler */
409
+ struct dm_irq_params dm_irq_params;
415410 /* pll sharing */
416411 struct amdgpu_atom_ss ss;
417412 bool ss_enabled;
....@@ -434,11 +429,6 @@
434429
435430 int otg_inst;
436431 struct drm_pending_vblank_event *event;
437
-};
438
-
439
-struct amdgpu_plane {
440
- struct drm_plane base;
441
- enum drm_plane_type plane_type;
442432 };
443433
444434 struct amdgpu_encoder_atom_dig {
....@@ -481,6 +471,7 @@
481471 struct amdgpu_connector_atom_dig {
482472 /* displayport */
483473 u8 dpcd[DP_RECEIVER_CAP_SIZE];
474
+ u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS];
484475 u8 dp_sink_type;
485476 int dp_clock;
486477 int dp_lane_count;
....@@ -624,6 +615,11 @@
624615 struct drm_display_mode *adjusted_mode);
625616 int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc);
626617
618
+bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc,
619
+ bool in_vblank_irq, int *vpos,
620
+ int *hpos, ktime_t *stime, ktime_t *etime,
621
+ const struct drm_display_mode *mode);
622
+
627623 /* fbdev layer */
628624 int amdgpu_fbdev_init(struct amdgpu_device *adev);
629625 void amdgpu_fbdev_fini(struct amdgpu_device *adev);