Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01f5e691 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'omapdrm-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next

omapdrm changes for 4.11

The main change here is the IRQ code cleanup, which gives us properly working
vblank counts and timestamps. We also get much less calls to runtime PM gets &
puts.

* tag 'omapdrm-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (26 commits)
  drm/omap: panel-sony-acx565akm.c: Add MODULE_ALIAS
  drm/omap: dsi: fix compile errors when enabling debug prints
  drm: omapdrm: Perform initialization/cleanup at probe/remove time
  drm: Move vblank cleanup from unregister to release
  drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structures
  drm: omapdrm: Remove global variables
  drm: omapdrm: Simplify IRQ wait implementation
  drm: omapdrm: Inline the pipe2vbl function
  drm: omapdrm: Don't call DISPC power handling in IRQ wait functions
  drm: omapdrm: Remove unused parameter from omap_drm_irq handler
  drm: omapdrm: Don't expose the omap_irq_(un)register() functions
  drm: omapdrm: Keep vblank interrupt enabled while CRTC is active
  drm: omapdrm: Use a spinlock to protect the CRTC pending flag
  drm: omapdrm: Prevent processing the same event multiple times
  drm: omapdrm: Check the CRTC software state at enable/disable time
  drm: omapdrm: Let the DRM core skip plane commit on inactive CRTCs
  drm: omapdrm: Replace DSS manager state check with omapdrm CRTC state
  drm: omapdrm: Handle OCP error IRQ directly
  drm: omapdrm: Handle CRTC error IRQs directly
  drm: omapdrm: Handle FIFO underflow IRQs internally
  ...
parents d64a1661 42f7f3c4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -598,6 +598,8 @@ static void drm_dev_release(struct kref *ref)
{
	struct drm_device *dev = container_of(ref, struct drm_device, ref);

	drm_vblank_cleanup(dev);

	if (drm_core_check_feature(dev, DRIVER_GEM))
		drm_gem_destroy(dev);

@@ -805,8 +807,6 @@ void drm_dev_unregister(struct drm_device *dev)
	if (dev->agp)
		drm_pci_agp_destroy(dev);

	drm_vblank_cleanup(dev);

	list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
		drm_legacy_rmmap(dev, r_list->map);

+1 −1
Original line number Diff line number Diff line
@@ -1253,7 +1253,7 @@ static int dsicm_probe(struct platform_device *pdev)
	dsicm_hw_reset(ddata);

	if (ddata->use_dsi_backlight) {
		memset(&props, 0, sizeof(struct backlight_properties));
		memset(&props, 0, sizeof(props));
		props.max_brightness = 255;

		props.type = BACKLIGHT_RAW;
+1 −0
Original line number Diff line number Diff line
@@ -909,6 +909,7 @@ static struct spi_driver acx565akm_driver = {

module_spi_driver(acx565akm_driver);

MODULE_ALIAS("spi:sony,acx565akm");
MODULE_AUTHOR("Nokia Corporation");
MODULE_DESCRIPTION("acx565akm LCD Driver");
MODULE_LICENSE("GPL");
+13 −14
Original line number Diff line number Diff line
@@ -620,6 +620,19 @@ u32 dispc_wb_get_framedone_irq(void)
	return DISPC_IRQ_FRAMEDONEWB;
}

void dispc_mgr_enable(enum omap_channel channel, bool enable)
{
	mgr_fld_write(channel, DISPC_MGR_FLD_ENABLE, enable);
	/* flush posted write */
	mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE);
}
EXPORT_SYMBOL(dispc_mgr_enable);

static bool dispc_mgr_is_enabled(enum omap_channel channel)
{
	return !!mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE);
}

bool dispc_mgr_go_busy(enum omap_channel channel)
{
	return mgr_fld_read(channel, DISPC_MGR_FLD_GO) == 1;
@@ -2901,20 +2914,6 @@ enum omap_dss_output_id dispc_mgr_get_supported_outputs(enum omap_channel channe
}
EXPORT_SYMBOL(dispc_mgr_get_supported_outputs);

void dispc_mgr_enable(enum omap_channel channel, bool enable)
{
	mgr_fld_write(channel, DISPC_MGR_FLD_ENABLE, enable);
	/* flush posted write */
	mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE);
}
EXPORT_SYMBOL(dispc_mgr_enable);

bool dispc_mgr_is_enabled(enum omap_channel channel)
{
	return !!mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE);
}
EXPORT_SYMBOL(dispc_mgr_is_enabled);

void dispc_wb_enable(bool enable)
{
	dispc_ovl_enable(OMAP_DSS_WB, enable);
+9 −9
Original line number Diff line number Diff line
@@ -4336,7 +4336,7 @@ static void print_dsi_vm(const char *str,

	wc = DIV_ROUND_UP(t->hact * t->bitspp, 8);
	pps = DIV_ROUND_UP(wc + 6, t->ndl); /* pixel packet size */
	bl = t->hss + t->hsa + t->hse + t->hbp + t->hfront_porch;
	bl = t->hss + t->hsa + t->hse + t->hbp + t->hfp;
	tot = bl + pps;

#define TO_DSI_T(x) ((u32)div64_u64((u64)x * 1000000000llu, byteclk))
@@ -4345,14 +4345,14 @@ static void print_dsi_vm(const char *str,
			"%u/%u/%u/%u/%u/%u = %u + %u = %u\n",
			str,
			byteclk,
			t->hss, t->hsa, t->hse, t->hbp, pps, t->hfront_porch,
			t->hss, t->hsa, t->hse, t->hbp, pps, t->hfp,
			bl, pps, tot,
			TO_DSI_T(t->hss),
			TO_DSI_T(t->hsa),
			TO_DSI_T(t->hse),
			TO_DSI_T(t->hbp),
			TO_DSI_T(pps),
			TO_DSI_T(t->hfront_porch),
			TO_DSI_T(t->hfp),

			TO_DSI_T(bl),
			TO_DSI_T(pps),
@@ -4367,7 +4367,7 @@ static void print_dispc_vm(const char *str, const struct videomode *vm)
	int hact, bl, tot;

	hact = vm->hactive;
	bl = vm->hsync_len + vm->hbp + vm->hfront_porch;
	bl = vm->hsync_len + vm->hback_porch + vm->hfront_porch;
	tot = hact + bl;

#define TO_DISPC_T(x) ((u32)div64_u64((u64)x * 1000000000llu, pck))
@@ -4376,10 +4376,10 @@ static void print_dispc_vm(const char *str, const struct videomode *vm)
			"%u/%u/%u/%u = %u + %u = %u\n",
			str,
			pck,
			vm->hsync_len, vm->hbp, hact, vm->hfront_porch,
			vm->hsync_len, vm->hback_porch, hact, vm->hfront_porch,
			bl, hact, tot,
			TO_DISPC_T(vm->hsync_len),
			TO_DISPC_T(vm->hbp),
			TO_DISPC_T(vm->hback_porch),
			TO_DISPC_T(hact),
			TO_DISPC_T(vm->hfront_porch),
			TO_DISPC_T(bl),
@@ -4401,12 +4401,12 @@ static void print_dsi_dispc_vm(const char *str,
	dsi_tput = (u64)byteclk * t->ndl * 8;
	pck = (u32)div64_u64(dsi_tput, t->bitspp);
	dsi_hact = DIV_ROUND_UP(DIV_ROUND_UP(t->hact * t->bitspp, 8) + 6, t->ndl);
	dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfront_porch;
	dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfp;

	vm.pixelclock = pck;
	vm.hsync_len = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk);
	vm.hbp = div64_u64((u64)t->hbp * pck, byteclk);
	vm.hfront_porch = div64_u64((u64)t->hfront_porch * pck, byteclk);
	vm.hback_porch = div64_u64((u64)t->hbp * pck, byteclk);
	vm.hfront_porch = div64_u64((u64)t->hfp * pck, byteclk);
	vm.hactive = t->hact;

	print_dispc_vm(str, &vm);
Loading