Merge tag 'drm-next-2019-09-18' of git://anongit.freedesktop.org/drm/drm
Pull drm updates from Dave Airlie: "This is the main pull request for 5.4-rc1 merge window. I don't think there is anything outstanding so next week should just be fixes, but we'll see if I missed anything. I landed some fixes earlier in the week but got delayed writing summary and sending it out, due to a mix of sick kid and jetlag! There are some fixes pending, but I'd rather get the main merge out of the way instead of delaying it longer. It's also pretty large in commit count and new amd header file size. The largest thing is four new amdgpu products (navi12/14, arcturus and renoir APU support). Otherwise it's pretty much lots of work across the board, i915 has started landing tigerlake support, lots of icelake fixes and lots of locking reworking for future gpu support, lots of header file rework (drmP.h is nearly gone), some old legacy hacks (DRM_WAIT_ON) have been put into the places they are needed. uapi: - content protection type property for HDCP core: - rework include dependencies - lots of drmP.h removals - link rate calculation robustness fix - make fb helper map only when required - add connector->DDC adapter link - DRM_WAIT_ON removed - drop DRM_AUTH usage from drivers dma-buf: - reservation object fence helper dma-fence: - shrink dma_fence struct - merge signal functions - store timestamps in dma_fence - selftests ttm: - embed drm_get_object struct into ttm_buffer_object - release_notify callback bridges: - sii902x - audio graph card support - tc358767 - aux data handling rework - ti-snd64dsi86 - debugfs support, DSI mode flags support panels: - Support for GiantPlus GPM940B0, Sharp LQ070Y3DG3B, Ortustech COM37H3M, Novatek NT39016, Sharp LS020B1DD01D, Raydium RM67191, Boe Himax8279d, Sharp LD-D5116Z01B - TI nspire, NEC NL8048HL11, LG Philips LB035Q02, Sharp LS037V7DW01, Sony ACX565AKM, Toppoly TD028TTEC1 Toppoly TD043MTEA1 i915: - Initial tigerlake platform support - Locking simplification work, general all over refactoring. - Selftests - HDCP debug info improvements - DSI properties - Icelake display PLL fixes, colorspace fixes, bandwidth fixes, DSI suspend/resume - GuC fixes - Perf fixes - ElkhartLake enablement - DP MST fixes - GVT - command parser enhancements amdgpu: - add wipe memory on release flag for buffer creation - Navi12/14 support (may be marked experimental) - Arcturus support - Renoir APU support - mclk DPM for Navi - DC display fixes - Raven scatter/gather support - RAS support for GFX - Navi12 + Arcturus power features - GPU reset for Picasso - smu11 i2c controller support amdkfd: - navi12/14 support - Arcturus support radeon: - kexec fix nouveau: - improved display color management - detect lack of GPU power cables vmwgfx: - evicition priority support - remove unused security feature msm: - msm8998 display support - better async commit support for cursor updates etnaviv: - per-process address space support - performance counter fixes - softpin support mcde: - DCS transfers fix exynos: - drmP.h cleanup lima: - reduce logging kirin: - misc clenaups komeda: - dual-link support - DT memory regions hisilicon: - misc fixes imx: - IPUv3 image converter fixes - 32-bit RGB V4L2 pixel format support ingenic: - more support for panel related cases mgag200: - cursor support fix panfrost: - export GPU features register to userspace - gpu heap allocations - per-fd address space support pl111: - CLD pads wiring support removed from DT rockchip: - rework to use DRM PSR helpers - fix bug in VOP_WIN_GET macro - DSI DT binding rework sun4i: - improve support for color encoding and range - DDC enabled GPIO tinydrm: - rework SPI support - improve MIPI-DBI support - moved to drm/tiny vkms: - rework CRC tracking dw-hdmi: - get_eld and i2s improvements gm12u320: - misc fixes meson: - global code cleanup - vpu feature detect omap: - alpha/pixel blend mode properties rcar-du: - misc fixes" * tag 'drm-next-2019-09-18' of git://anongit.freedesktop.org/drm/drm: (2112 commits) drm/nouveau/bar/gm20b: Avoid BAR1 teardown during init drm/nouveau: Fix ordering between TTM and GEM release drm/nouveau/prime: Extend DMA reservation object lock drm/nouveau: Fix fallout from reservation object rework drm/nouveau/kms/nv50-: Don't create MSTMs for eDP connectors drm/i915: Use NOEVICT for first pass on attemping to pin a GGTT mmap drm/i915: to make vgpu ppgtt notificaiton as atomic operation drm/i915: Flush the existing fence before GGTT read/write drm/i915: Hold irq-off for the entire fake lock period drm/i915/gvt: update RING_START reg of vGPU when the context is submitted to i915 drm/i915/gvt: update vgpu workload head pointer correctly drm/mcde: Fix DSI transfers drm/msm: Use the correct dma_sync calls harder drm/msm: remove unlikely() from WARN_ON() conditions drm/msm/dsi: Fix return value check for clk_get_parent drm/msm: add atomic traces drm/msm/dpu: async commit support drm/msm: async commit support drm/msm: split power control from prepare/complete_commit drm/msm: add kms->flush_commit() ...
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
* Author: James.Qian.Wang <james.qian.wang@arm.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#include <drm/drm_print.h>
|
||||
#include "d71_dev.h"
|
||||
#include "komeda_kms.h"
|
||||
#include "malidp_io.h"
|
||||
@@ -804,7 +802,7 @@ static int d71_downscaling_clk_check(struct komeda_pipeline *pipe,
|
||||
denominator = (mode->htotal - 1) * v_out - 2 * v_in;
|
||||
}
|
||||
|
||||
return aclk_rate * denominator >= mode->clock * 1000 * fraction ?
|
||||
return aclk_rate * denominator >= mode->crtc_clock * 1000 * fraction ?
|
||||
0 : -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1032,21 +1030,31 @@ static void d71_timing_ctrlr_update(struct komeda_component *c,
|
||||
struct komeda_component_state *state)
|
||||
{
|
||||
struct drm_crtc_state *crtc_st = state->crtc->state;
|
||||
struct drm_display_mode *mode = &crtc_st->adjusted_mode;
|
||||
u32 __iomem *reg = c->reg;
|
||||
struct videomode vm;
|
||||
u32 hactive, hfront_porch, hback_porch, hsync_len;
|
||||
u32 vactive, vfront_porch, vback_porch, vsync_len;
|
||||
u32 value;
|
||||
|
||||
drm_display_mode_to_videomode(&crtc_st->adjusted_mode, &vm);
|
||||
hactive = mode->crtc_hdisplay;
|
||||
hfront_porch = mode->crtc_hsync_start - mode->crtc_hdisplay;
|
||||
hsync_len = mode->crtc_hsync_end - mode->crtc_hsync_start;
|
||||
hback_porch = mode->crtc_htotal - mode->crtc_hsync_end;
|
||||
|
||||
malidp_write32(reg, BS_ACTIVESIZE, HV_SIZE(vm.hactive, vm.vactive));
|
||||
malidp_write32(reg, BS_HINTERVALS, BS_H_INTVALS(vm.hfront_porch,
|
||||
vm.hback_porch));
|
||||
malidp_write32(reg, BS_VINTERVALS, BS_V_INTVALS(vm.vfront_porch,
|
||||
vm.vback_porch));
|
||||
vactive = mode->crtc_vdisplay;
|
||||
vfront_porch = mode->crtc_vsync_start - mode->crtc_vdisplay;
|
||||
vsync_len = mode->crtc_vsync_end - mode->crtc_vsync_start;
|
||||
vback_porch = mode->crtc_vtotal - mode->crtc_vsync_end;
|
||||
|
||||
value = BS_SYNC_VSW(vm.vsync_len) | BS_SYNC_HSW(vm.hsync_len);
|
||||
value |= vm.flags & DISPLAY_FLAGS_VSYNC_HIGH ? BS_SYNC_VSP : 0;
|
||||
value |= vm.flags & DISPLAY_FLAGS_HSYNC_HIGH ? BS_SYNC_HSP : 0;
|
||||
malidp_write32(reg, BS_ACTIVESIZE, HV_SIZE(hactive, vactive));
|
||||
malidp_write32(reg, BS_HINTERVALS, BS_H_INTVALS(hfront_porch,
|
||||
hback_porch));
|
||||
malidp_write32(reg, BS_VINTERVALS, BS_V_INTVALS(vfront_porch,
|
||||
vback_porch));
|
||||
|
||||
value = BS_SYNC_VSW(vsync_len) | BS_SYNC_HSW(hsync_len);
|
||||
value |= mode->flags & DRM_MODE_FLAG_PVSYNC ? BS_SYNC_VSP : 0;
|
||||
value |= mode->flags & DRM_MODE_FLAG_PHSYNC ? BS_SYNC_HSP : 0;
|
||||
malidp_write32(reg, BS_SYNC, value);
|
||||
|
||||
malidp_write32(reg, BS_PROG_LINE, D71_DEFAULT_PREPRETCH_LINE - 1);
|
||||
@@ -1054,6 +1062,10 @@ static void d71_timing_ctrlr_update(struct komeda_component *c,
|
||||
|
||||
/* configure bs control register */
|
||||
value = BS_CTRL_EN | BS_CTRL_VM;
|
||||
if (c->pipeline->dual_link) {
|
||||
malidp_write32(reg, BS_DRIFT_TO, hfront_porch + 16);
|
||||
value |= BS_CTRL_DL;
|
||||
}
|
||||
|
||||
malidp_write32(reg, BLK_CONTROL, value);
|
||||
}
|
||||
|
@@ -27,8 +27,8 @@ static void komeda_crtc_update_clock_ratio(struct komeda_crtc_state *kcrtc_st)
|
||||
return;
|
||||
}
|
||||
|
||||
pxlclk = kcrtc_st->base.adjusted_mode.clock * 1000;
|
||||
aclk = komeda_calc_aclk(kcrtc_st);
|
||||
pxlclk = kcrtc_st->base.adjusted_mode.crtc_clock * 1000ULL;
|
||||
aclk = komeda_crtc_get_aclk(kcrtc_st);
|
||||
|
||||
kcrtc_st->clock_ratio = div64_u64(aclk << 32, pxlclk);
|
||||
}
|
||||
@@ -74,14 +74,6 @@ komeda_crtc_atomic_check(struct drm_crtc *crtc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long komeda_calc_aclk(struct komeda_crtc_state *kcrtc_st)
|
||||
{
|
||||
struct komeda_dev *mdev = kcrtc_st->base.crtc->dev->dev_private;
|
||||
unsigned long pxlclk = kcrtc_st->base.adjusted_mode.clock;
|
||||
|
||||
return clk_round_rate(mdev->aclk, pxlclk * 1000);
|
||||
}
|
||||
|
||||
/* For active a crtc, mainly need two parts of preparation
|
||||
* 1. adjust display operation mode.
|
||||
* 2. enable needed clk
|
||||
@@ -92,7 +84,7 @@ komeda_crtc_prepare(struct komeda_crtc *kcrtc)
|
||||
struct komeda_dev *mdev = kcrtc->base.dev->dev_private;
|
||||
struct komeda_pipeline *master = kcrtc->master;
|
||||
struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(kcrtc->base.state);
|
||||
unsigned long pxlclk_rate = kcrtc_st->base.adjusted_mode.clock * 1000;
|
||||
struct drm_display_mode *mode = &kcrtc_st->base.adjusted_mode;
|
||||
u32 new_mode;
|
||||
int err;
|
||||
|
||||
@@ -118,7 +110,7 @@ komeda_crtc_prepare(struct komeda_crtc *kcrtc)
|
||||
* to enable it again.
|
||||
*/
|
||||
if (new_mode != KOMEDA_MODE_DUAL_DISP) {
|
||||
err = clk_set_rate(mdev->aclk, komeda_calc_aclk(kcrtc_st));
|
||||
err = clk_set_rate(mdev->aclk, komeda_crtc_get_aclk(kcrtc_st));
|
||||
if (err)
|
||||
DRM_ERROR("failed to set aclk.\n");
|
||||
err = clk_prepare_enable(mdev->aclk);
|
||||
@@ -126,7 +118,7 @@ komeda_crtc_prepare(struct komeda_crtc *kcrtc)
|
||||
DRM_ERROR("failed to enable aclk.\n");
|
||||
}
|
||||
|
||||
err = clk_set_rate(master->pxlclk, pxlclk_rate);
|
||||
err = clk_set_rate(master->pxlclk, mode->crtc_clock * 1000);
|
||||
if (err)
|
||||
DRM_ERROR("failed to set pxlclk for pipe%d\n", master->id);
|
||||
err = clk_prepare_enable(master->pxlclk);
|
||||
@@ -342,29 +334,58 @@ komeda_crtc_atomic_flush(struct drm_crtc *crtc,
|
||||
komeda_crtc_do_flush(crtc, old);
|
||||
}
|
||||
|
||||
/* Returns the minimum frequency of the aclk rate (main engine clock) in Hz */
|
||||
static unsigned long
|
||||
komeda_calc_min_aclk_rate(struct komeda_crtc *kcrtc,
|
||||
unsigned long pxlclk)
|
||||
{
|
||||
/* Once dual-link one display pipeline drives two display outputs,
|
||||
* the aclk needs run on the double rate of pxlclk
|
||||
*/
|
||||
if (kcrtc->master->dual_link)
|
||||
return pxlclk * 2;
|
||||
else
|
||||
return pxlclk;
|
||||
}
|
||||
|
||||
/* Get current aclk rate that specified by state */
|
||||
unsigned long komeda_crtc_get_aclk(struct komeda_crtc_state *kcrtc_st)
|
||||
{
|
||||
struct drm_crtc *crtc = kcrtc_st->base.crtc;
|
||||
struct komeda_dev *mdev = crtc->dev->dev_private;
|
||||
unsigned long pxlclk = kcrtc_st->base.adjusted_mode.crtc_clock * 1000;
|
||||
unsigned long min_aclk;
|
||||
|
||||
min_aclk = komeda_calc_min_aclk_rate(to_kcrtc(crtc), pxlclk);
|
||||
|
||||
return clk_round_rate(mdev->aclk, min_aclk);
|
||||
}
|
||||
|
||||
static enum drm_mode_status
|
||||
komeda_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *m)
|
||||
{
|
||||
struct komeda_dev *mdev = crtc->dev->dev_private;
|
||||
struct komeda_crtc *kcrtc = to_kcrtc(crtc);
|
||||
struct komeda_pipeline *master = kcrtc->master;
|
||||
long mode_clk, pxlclk;
|
||||
unsigned long min_pxlclk, min_aclk;
|
||||
|
||||
if (m->flags & DRM_MODE_FLAG_INTERLACE)
|
||||
return MODE_NO_INTERLACE;
|
||||
|
||||
mode_clk = m->clock * 1000;
|
||||
pxlclk = clk_round_rate(master->pxlclk, mode_clk);
|
||||
if (pxlclk != mode_clk) {
|
||||
DRM_DEBUG_ATOMIC("pxlclk doesn't support %ld Hz\n", mode_clk);
|
||||
min_pxlclk = m->clock * 1000;
|
||||
if (master->dual_link)
|
||||
min_pxlclk /= 2;
|
||||
|
||||
if (min_pxlclk != clk_round_rate(master->pxlclk, min_pxlclk)) {
|
||||
DRM_DEBUG_ATOMIC("pxlclk doesn't support %lu Hz\n", min_pxlclk);
|
||||
|
||||
return MODE_NOCLOCK;
|
||||
}
|
||||
|
||||
/* main engine clock must be faster than pxlclk*/
|
||||
if (clk_round_rate(mdev->aclk, mode_clk) < pxlclk) {
|
||||
DRM_DEBUG_ATOMIC("engine clk can't satisfy the requirement of %s-clk: %ld.\n",
|
||||
m->name, pxlclk);
|
||||
min_aclk = komeda_calc_min_aclk_rate(to_kcrtc(crtc), min_pxlclk);
|
||||
if (clk_round_rate(mdev->aclk, min_aclk) < min_aclk) {
|
||||
DRM_DEBUG_ATOMIC("engine clk can't satisfy the requirement of %s-clk: %lu.\n",
|
||||
m->name, min_pxlclk);
|
||||
|
||||
return MODE_CLOCK_HIGH;
|
||||
}
|
||||
@@ -377,10 +398,22 @@ static bool komeda_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
struct drm_display_mode *adjusted_mode)
|
||||
{
|
||||
struct komeda_crtc *kcrtc = to_kcrtc(crtc);
|
||||
struct komeda_pipeline *master = kcrtc->master;
|
||||
long mode_clk = m->clock * 1000;
|
||||
unsigned long clk_rate;
|
||||
|
||||
adjusted_mode->clock = clk_round_rate(master->pxlclk, mode_clk) / 1000;
|
||||
drm_mode_set_crtcinfo(adjusted_mode, 0);
|
||||
/* In dual link half the horizontal settings */
|
||||
if (kcrtc->master->dual_link) {
|
||||
adjusted_mode->crtc_clock /= 2;
|
||||
adjusted_mode->crtc_hdisplay /= 2;
|
||||
adjusted_mode->crtc_hsync_start /= 2;
|
||||
adjusted_mode->crtc_hsync_end /= 2;
|
||||
adjusted_mode->crtc_htotal /= 2;
|
||||
}
|
||||
|
||||
clk_rate = adjusted_mode->crtc_clock * 1000;
|
||||
/* crtc_clock will be used as the komeda output pixel clock */
|
||||
adjusted_mode->crtc_clock = clk_round_rate(kcrtc->master->pxlclk,
|
||||
clk_rate) / 1000;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -488,10 +521,8 @@ int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
|
||||
else
|
||||
sprintf(str, "None");
|
||||
|
||||
DRM_INFO("crtc%d: master(pipe-%d) slave(%s) output: %s.\n",
|
||||
kms->n_crtcs, master->id, str,
|
||||
master->of_output_dev ?
|
||||
master->of_output_dev->full_name : "None");
|
||||
DRM_INFO("CRTC-%d: master(pipe-%d) slave(%s).\n",
|
||||
kms->n_crtcs, master->id, str);
|
||||
|
||||
kms->n_crtcs++;
|
||||
}
|
||||
|
@@ -122,11 +122,14 @@ static int komeda_parse_pipe_dt(struct komeda_dev *mdev, struct device_node *np)
|
||||
pipe->pxlclk = clk;
|
||||
|
||||
/* enum ports */
|
||||
pipe->of_output_dev =
|
||||
pipe->of_output_links[0] =
|
||||
of_graph_get_remote_node(np, KOMEDA_OF_PORT_OUTPUT, 0);
|
||||
pipe->of_output_links[1] =
|
||||
of_graph_get_remote_node(np, KOMEDA_OF_PORT_OUTPUT, 1);
|
||||
pipe->of_output_port =
|
||||
of_graph_get_port_by_id(np, KOMEDA_OF_PORT_OUTPUT);
|
||||
|
||||
pipe->dual_link = pipe->of_output_links[0] && pipe->of_output_links[1];
|
||||
pipe->of_node = of_node_get(np);
|
||||
|
||||
return 0;
|
||||
|
@@ -83,11 +83,12 @@ static int compare_of(struct device *dev, void *data)
|
||||
|
||||
static void komeda_add_slave(struct device *master,
|
||||
struct component_match **match,
|
||||
struct device_node *np, int port)
|
||||
struct device_node *np,
|
||||
u32 port, u32 endpoint)
|
||||
{
|
||||
struct device_node *remote;
|
||||
|
||||
remote = of_graph_get_remote_node(np, port, 0);
|
||||
remote = of_graph_get_remote_node(np, port, endpoint);
|
||||
if (remote) {
|
||||
drm_of_component_match_add(master, match, compare_of, remote);
|
||||
of_node_put(remote);
|
||||
@@ -108,7 +109,8 @@ static int komeda_platform_probe(struct platform_device *pdev)
|
||||
continue;
|
||||
|
||||
/* add connector */
|
||||
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT);
|
||||
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT, 0);
|
||||
komeda_add_slave(dev, &match, child, KOMEDA_OF_PORT_OUTPUT, 1);
|
||||
}
|
||||
|
||||
return component_master_add_with_match(dev, &komeda_master_ops, match);
|
||||
|
@@ -56,16 +56,13 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data)
|
||||
}
|
||||
|
||||
static struct drm_driver komeda_kms_driver = {
|
||||
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC |
|
||||
DRIVER_PRIME | DRIVER_HAVE_IRQ,
|
||||
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
|
||||
.lastclose = drm_fb_helper_lastclose,
|
||||
.gem_free_object_unlocked = drm_gem_cma_free_object,
|
||||
.gem_vm_ops = &drm_gem_cma_vm_ops,
|
||||
.dumb_create = komeda_gem_cma_dumb_create,
|
||||
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
|
||||
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
|
||||
.gem_prime_export = drm_gem_prime_export,
|
||||
.gem_prime_import = drm_gem_prime_import,
|
||||
.gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
|
||||
.gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
|
||||
.gem_prime_vmap = drm_gem_cma_prime_vmap,
|
||||
|
@@ -14,8 +14,6 @@
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_writeback.h>
|
||||
#include <drm/drm_print.h>
|
||||
#include <video/videomode.h>
|
||||
#include <video/display_timing.h>
|
||||
|
||||
/**
|
||||
* struct komeda_plane - komeda instance of drm_plane
|
||||
@@ -168,7 +166,7 @@ static inline bool has_flip_h(u32 rot)
|
||||
return !!(rotation & DRM_MODE_REFLECT_X);
|
||||
}
|
||||
|
||||
unsigned long komeda_calc_aclk(struct komeda_crtc_state *kcrtc_st);
|
||||
unsigned long komeda_crtc_get_aclk(struct komeda_crtc_state *kcrtc_st);
|
||||
|
||||
int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms, struct komeda_dev *mdev);
|
||||
|
||||
|
@@ -54,7 +54,8 @@ void komeda_pipeline_destroy(struct komeda_dev *mdev,
|
||||
|
||||
clk_put(pipe->pxlclk);
|
||||
|
||||
of_node_put(pipe->of_output_dev);
|
||||
of_node_put(pipe->of_output_links[0]);
|
||||
of_node_put(pipe->of_output_links[1]);
|
||||
of_node_put(pipe->of_output_port);
|
||||
of_node_put(pipe->of_node);
|
||||
|
||||
@@ -246,9 +247,15 @@ static void komeda_pipeline_dump(struct komeda_pipeline *pipe)
|
||||
struct komeda_component *c;
|
||||
int id;
|
||||
|
||||
DRM_INFO("Pipeline-%d: n_layers: %d, n_scalers: %d, output: %s\n",
|
||||
DRM_INFO("Pipeline-%d: n_layers: %d, n_scalers: %d, output: %s.\n",
|
||||
pipe->id, pipe->n_layers, pipe->n_scalers,
|
||||
pipe->of_output_dev ? pipe->of_output_dev->full_name : "none");
|
||||
pipe->dual_link ? "dual-link" : "single-link");
|
||||
DRM_INFO(" output_link[0]: %s.\n",
|
||||
pipe->of_output_links[0] ?
|
||||
pipe->of_output_links[0]->full_name : "none");
|
||||
DRM_INFO(" output_link[1]: %s.\n",
|
||||
pipe->of_output_links[1] ?
|
||||
pipe->of_output_links[1]->full_name : "none");
|
||||
|
||||
dp_for_each_set_bit(id, pipe->avail_comps) {
|
||||
c = komeda_pipeline_get_component(pipe, id);
|
||||
@@ -305,6 +312,12 @@ static void komeda_pipeline_assemble(struct komeda_pipeline *pipe)
|
||||
|
||||
layer->right = komeda_get_layer_split_right_layer(pipe, layer);
|
||||
}
|
||||
|
||||
if (pipe->dual_link && !pipe->ctrlr->supports_dual_link) {
|
||||
pipe->dual_link = false;
|
||||
DRM_WARN("PIPE-%d doesn't support dual-link, ignore DT dual-link configuration.\n",
|
||||
pipe->id);
|
||||
}
|
||||
}
|
||||
|
||||
/* if pipeline_A accept another pipeline_B's component as input, treat
|
||||
|
@@ -416,8 +416,10 @@ struct komeda_pipeline {
|
||||
struct device_node *of_node;
|
||||
/** @of_output_port: pipeline output port */
|
||||
struct device_node *of_output_port;
|
||||
/** @of_output_dev: output connector device node */
|
||||
struct device_node *of_output_dev;
|
||||
/** @of_output_links: output connector device nodes */
|
||||
struct device_node *of_output_links[2];
|
||||
/** @dual_link: true if of_output_links[0] and [1] are both valid */
|
||||
bool dual_link;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -473,7 +473,7 @@ komeda_scaler_check_cfg(struct komeda_scaler *scaler,
|
||||
|
||||
err = pipe->funcs->downscaling_clk_check(pipe,
|
||||
&kcrtc_st->base.adjusted_mode,
|
||||
komeda_calc_aclk(kcrtc_st), dflow);
|
||||
komeda_crtc_get_aclk(kcrtc_st), dflow);
|
||||
if (err) {
|
||||
DRM_DEBUG_ATOMIC("aclk can't satisfy the clock requirement of the downscaling\n");
|
||||
return err;
|
||||
|
@@ -158,7 +158,7 @@ static void komeda_plane_reset(struct drm_plane *plane)
|
||||
static struct drm_plane_state *
|
||||
komeda_plane_atomic_duplicate_state(struct drm_plane *plane)
|
||||
{
|
||||
struct komeda_plane_state *new, *old;
|
||||
struct komeda_plane_state *new;
|
||||
|
||||
if (WARN_ON(!plane->state))
|
||||
return NULL;
|
||||
@@ -169,8 +169,6 @@ komeda_plane_atomic_duplicate_state(struct drm_plane *plane)
|
||||
|
||||
__drm_atomic_helper_plane_duplicate_state(plane, &new->base);
|
||||
|
||||
old = to_kplane_st(plane->state);
|
||||
|
||||
return &new->base;
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,12 @@
|
||||
* Implementation of a CRTC class for the HDLCD driver.
|
||||
*/
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/platform_data/simplefb.h>
|
||||
|
||||
#include <video/videomode.h>
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
@@ -19,10 +24,7 @@
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drm_plane_helper.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/platform_data/simplefb.h>
|
||||
#include <video/videomode.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
#include "hdlcd_drv.h"
|
||||
#include "hdlcd_regs.h"
|
||||
|
@@ -14,21 +14,26 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/component.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/of_reserved_mem.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_debugfs.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_irq.h>
|
||||
#include <drm/drm_modeset_helper.h>
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
#include "hdlcd_drv.h"
|
||||
#include "hdlcd_regs.h"
|
||||
@@ -229,9 +234,7 @@ static int hdlcd_debugfs_init(struct drm_minor *minor)
|
||||
DEFINE_DRM_GEM_CMA_FOPS(fops);
|
||||
|
||||
static struct drm_driver hdlcd_driver = {
|
||||
.driver_features = DRIVER_GEM |
|
||||
DRIVER_MODESET | DRIVER_PRIME |
|
||||
DRIVER_ATOMIC,
|
||||
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
|
||||
.irq_handler = hdlcd_irq,
|
||||
.irq_preinstall = hdlcd_irq_preinstall,
|
||||
.irq_postinstall = hdlcd_irq_postinstall,
|
||||
@@ -242,8 +245,6 @@ static struct drm_driver hdlcd_driver = {
|
||||
.dumb_create = drm_gem_cma_dumb_create,
|
||||
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
|
||||
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
|
||||
.gem_prime_export = drm_gem_prime_export,
|
||||
.gem_prime_import = drm_gem_prime_import,
|
||||
.gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
|
||||
.gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
|
||||
.gem_prime_vmap = drm_gem_cma_prime_vmap,
|
||||
|
@@ -6,14 +6,17 @@
|
||||
* ARM Mali DP500/DP550/DP650 driver (crtc operations)
|
||||
*/
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include <video/videomode.h>
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_print.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <video/videomode.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
#include "malidp_drv.h"
|
||||
#include "malidp_hw.h"
|
||||
|
@@ -15,17 +15,19 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_modeset_helper.h>
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
#include "malidp_drv.h"
|
||||
#include "malidp_mw.h"
|
||||
@@ -561,15 +563,12 @@ static int malidp_debugfs_init(struct drm_minor *minor)
|
||||
#endif //CONFIG_DEBUG_FS
|
||||
|
||||
static struct drm_driver malidp_driver = {
|
||||
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC |
|
||||
DRIVER_PRIME,
|
||||
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
|
||||
.gem_free_object_unlocked = drm_gem_cma_free_object,
|
||||
.gem_vm_ops = &drm_gem_cma_vm_ops,
|
||||
.dumb_create = malidp_dumb_create,
|
||||
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
|
||||
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
|
||||
.gem_prime_export = drm_gem_prime_export,
|
||||
.gem_prime_import = drm_gem_prime_import,
|
||||
.gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
|
||||
.gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
|
||||
.gem_prime_vmap = drm_gem_cma_prime_vmap,
|
||||
|
@@ -9,12 +9,13 @@
|
||||
#ifndef __MALIDP_DRV_H__
|
||||
#define __MALIDP_DRV_H__
|
||||
|
||||
#include <drm/drm_writeback.h>
|
||||
#include <drm/drm_encoder.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <drm/drmP.h>
|
||||
|
||||
#include <drm/drm_writeback.h>
|
||||
#include <drm/drm_encoder.h>
|
||||
|
||||
#include "malidp_hw.h"
|
||||
|
||||
#define MALIDP_CONFIG_VALID_INIT 0
|
||||
|
@@ -9,12 +9,17 @@
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/io.h>
|
||||
#include <drm/drmP.h>
|
||||
|
||||
#include <video/videomode.h>
|
||||
#include <video/display_timing.h>
|
||||
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
#include <drm/drm_print.h>
|
||||
|
||||
#include "malidp_drv.h"
|
||||
#include "malidp_hw.h"
|
||||
#include "malidp_mw.h"
|
||||
@@ -385,6 +390,7 @@ int malidp_format_get_bpp(u32 fmt)
|
||||
switch (fmt) {
|
||||
case DRM_FORMAT_VUY101010:
|
||||
bpp = 30;
|
||||
break;
|
||||
case DRM_FORMAT_YUV420_10BIT:
|
||||
bpp = 15;
|
||||
break;
|
||||
@@ -1309,7 +1315,7 @@ static irqreturn_t malidp_se_irq(int irq, void *arg)
|
||||
break;
|
||||
case MW_RESTART:
|
||||
drm_writeback_signal_completion(&malidp->mw_connector, 0);
|
||||
/* fall through to a new start */
|
||||
/* fall through - to a new start */
|
||||
case MW_START:
|
||||
/* writeback started, need to emulate one-shot mode */
|
||||
hw->disable_memwrite(hwdev);
|
||||
|
@@ -5,13 +5,14 @@
|
||||
*
|
||||
* ARM Mali DP Writeback connector implementation
|
||||
*/
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_writeback.h>
|
||||
|
||||
#include "malidp_drv.h"
|
||||
|
@@ -7,11 +7,13 @@
|
||||
*/
|
||||
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_plane_helper.h>
|
||||
|
Reference in New Issue
Block a user