Index: uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c
===================================================================
--- uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c	(revision b27553c1c5a811aeba3e07e95c353cebbbed5ccd)
+++ uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c	(revision 048a6e9c127d74bfa46a05fbda6db15033ceea86)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2020 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * Copyright (c) 2013 Jan Vesely
  * All rights reserved.
@@ -67,4 +67,5 @@
 static errno_t amdm37x_ddev_get_info(void *, ddev_info_t *);
 
+static errno_t amdm37x_gc_set_clip_rect(void *, gfx_rect_t *);
 static errno_t amdm37x_gc_set_color(void *, gfx_color_t *);
 static errno_t amdm37x_gc_fill_rect(void *, gfx_rect_t *);
@@ -81,4 +82,5 @@
 
 gfx_context_ops_t amdm37x_gc_ops = {
+	.set_clip_rect = amdm37x_gc_set_clip_rect,
 	.set_color = amdm37x_gc_set_color,
 	.fill_rect = amdm37x_gc_fill_rect,
@@ -291,4 +293,5 @@
 	dispc->rect.p1.x = x;
 	dispc->rect.p1.y = y;
+	dispc->clip_rect = dispc->rect;
 	dispc->size = size;
 
@@ -321,4 +324,23 @@
 }
 
+/** Set clipping rectangle on AMDM37x display controller.
+ *
+ * @param arg AMDM37x display controller
+ * @param rect Rectangle
+ *
+ * @return EOK on success or an error code
+ */
+static errno_t amdm37x_gc_set_clip_rect(void *arg, gfx_rect_t *rect)
+{
+	amdm37x_dispc_t *dispc = (amdm37x_dispc_t *) arg;
+
+	if (rect != NULL)
+		gfx_rect_clip(rect, &dispc->rect, &dispc->clip_rect);
+	else
+		dispc->clip_rect = dispc->rect;
+
+	return EOK;
+}
+
 /** Set color on AMDM37x display controller.
  *
@@ -354,5 +376,5 @@
 
 	/* Make sure we have a sorted, clipped rectangle */
-	gfx_rect_clip(rect, &dispc->rect, &crect);
+	gfx_rect_clip(rect, &dispc->clip_rect, &crect);
 
 	for (y = crect.p0.y; y < crect.p1.y; y++) {
@@ -479,6 +501,6 @@
 	pbm.data = dcbm->alloc.pixels;
 
-	/* Transform AMDM37x bounding rectangle back to bitmap coordinate system */
-	gfx_rect_rtranslate(&offs, &dispc->rect, &skfbrect);
+	/* Transform AMDM37x clipping rectangle back to bitmap coordinate system */
+	gfx_rect_rtranslate(&offs, &dispc->clip_rect, &skfbrect);
 
 	/*
Index: uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.h
===================================================================
--- uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.h	(revision b27553c1c5a811aeba3e07e95c353cebbbed5ccd)
+++ uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.h	(revision 048a6e9c127d74bfa46a05fbda6db15033ceea86)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2020 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * Copyright (c) 2013 Jan Vesely
  * All rights reserved.
@@ -63,4 +63,5 @@
 	pixel_t color;
 	gfx_rect_t rect;
+	gfx_rect_t clip_rect;
 	size_t size;
 	void *fb_data;
Index: uspace/drv/fb/kfb/port.c
===================================================================
--- uspace/drv/fb/kfb/port.c	(revision b27553c1c5a811aeba3e07e95c353cebbbed5ccd)
+++ uspace/drv/fb/kfb/port.c	(revision 048a6e9c127d74bfa46a05fbda6db15033ceea86)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2019 Jiri Svoboda
+ * Copyright (c) 2021 Jiri Svoboda
  * Copyright (c) 2006 Jakub Vana
  * Copyright (c) 2006 Ondrej Palkovsky
@@ -69,4 +69,5 @@
 	sysarg_t paddr;
 	gfx_rect_t rect;
+	gfx_rect_t clip_rect;
 	size_t offset;
 	size_t scanline;
@@ -97,4 +98,5 @@
 static errno_t kfb_ddev_get_info(void *, ddev_info_t *);
 
+static errno_t kfb_gc_set_clip_rect(void *, gfx_rect_t *);
 static errno_t kfb_gc_set_color(void *, gfx_color_t *);
 static errno_t kfb_gc_fill_rect(void *, gfx_rect_t *);
@@ -111,4 +113,5 @@
 
 static gfx_context_ops_t kfb_gc_ops = {
+	.set_clip_rect = kfb_gc_set_clip_rect,
 	.set_color = kfb_gc_set_color,
 	.fill_rect = kfb_gc_fill_rect,
@@ -134,4 +137,23 @@
 	ddev_info_init(info);
 	info->rect = kfb->rect;
+	return EOK;
+}
+
+/** Set clipping rectangle on KFB.
+ *
+ * @param arg KFB
+ * @param rect Rectangle or @c NULL
+ *
+ * @return EOK on success or an error code
+ */
+static errno_t kfb_gc_set_clip_rect(void *arg, gfx_rect_t *rect)
+{
+	kfb_t *kfb = (kfb_t *) arg;
+
+	if (rect != NULL)
+		gfx_rect_clip(rect, &kfb->rect, &kfb->clip_rect);
+	else
+		kfb->clip_rect = kfb->rect;
+
 	return EOK;
 }
@@ -361,5 +383,4 @@
 }
 
-#include <stdio.h>
 static void kfb_client_conn(ipc_call_t *icall, void *arg)
 {
@@ -372,9 +393,4 @@
 	kfb = (kfb_t *) ddf_fun_data_get((ddf_fun_t *) arg);
 
-	printf("kfb_client_conn arg2=%lu arg3=%lu arg4=%lu\n",
-	    (unsigned long) ipc_get_arg2(icall),
-	    (unsigned long) ipc_get_arg3(icall),
-	    (unsigned long) ipc_get_arg4(icall));
-
 	gc_id = ipc_get_arg3(icall);
 
@@ -500,4 +516,6 @@
 	kfb->rect.p1.x = width;
 	kfb->rect.p1.y = height;
+
+	kfb->clip_rect = kfb->rect;
 
 	kfb->paddr = paddr;
