--- /dev/null
+diff -ruN '--exclude=.svn' lcd4linux-svn1179/drv_SamsungSPF.c lcd4linux/drv_SamsungSPF.c
+--- lcd4linux-svn1179/drv_SamsungSPF.c 2012-02-26 22:17:04.000000000 +0100
++++ lcd4linux/drv_SamsungSPF.c 2012-02-26 23:31:06.000000000 +0100
+@@ -52,6 +52,7 @@
+
+ /* graphic display? */
+ #include "drv_generic_graphic.h"
++#include "jpeg_mem_dest.h"
+
+ // Drivername for verbose output
+ static char Name[] = "SamsungSPF";
+diff -ruN '--exclude=.svn' lcd4linux-svn1179/jpeg_mem_dest.h lcd4linux/jpeg_mem_dest.h
+--- lcd4linux-svn1179/jpeg_mem_dest.h 1970-01-01 01:00:00.000000000 +0100
++++ lcd4linux/jpeg_mem_dest.h 2012-02-26 23:30:06.000000000 +0100
+@@ -0,0 +1,112 @@
++#define ERREXIT(cinfo,code) \
++ ((cinfo)->err->msg_code = (code), \
++ (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
++#define ERREXIT1(cinfo,code,p1) \
++ ((cinfo)->err->msg_code = (code), \
++ (cinfo)->err->msg_parm.i[0] = (p1), \
++ (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
++
++#define JERR_OUT_OF_MEMORY "Insufficient memory (case %d)"
++#define JERR_BUFFER_SIZE "Buffer passed to JPEG library is too small"
++
++#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */
++
++
++/* Expanded data destination object for memory output */
++
++typedef struct {
++ struct jpeg_destination_mgr pub; /* public fields */
++
++ unsigned char ** outbuffer; /* target buffer */
++ unsigned long * outsize;
++ unsigned char * newbuffer; /* newly allocated buffer */
++ JOCTET * buffer; /* start of buffer */
++ size_t bufsize;
++} my_mem_destination_mgr;
++
++typedef my_mem_destination_mgr * my_mem_dest_ptr;
++
++
++METHODDEF(void)
++init_mem_destination (j_compress_ptr cinfo)
++{
++ /* no work necessary here */
++}
++
++METHODDEF(boolean)
++empty_mem_output_buffer (j_compress_ptr cinfo)
++{
++ size_t nextsize;
++ JOCTET * nextbuffer;
++ my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest;
++
++ /* Try to allocate new buffer with double size */
++ nextsize = dest->bufsize * 2;
++ nextbuffer = (JOCTET *) malloc(nextsize);
++
++ if (nextbuffer == NULL)
++ ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
++
++ memcpy(nextbuffer, dest->buffer, dest->bufsize);
++
++ if (dest->newbuffer != NULL)
++ free(dest->newbuffer);
++
++ dest->newbuffer = nextbuffer;
++
++ dest->pub.next_output_byte = nextbuffer + dest->bufsize;
++ dest->pub.free_in_buffer = dest->bufsize;
++
++ dest->buffer = nextbuffer;
++ dest->bufsize = nextsize;
++
++ return TRUE;
++}
++
++METHODDEF(void)
++term_mem_destination (j_compress_ptr cinfo)
++{
++ my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest;
++
++ *dest->outbuffer = dest->buffer;
++ *dest->outsize = dest->bufsize - dest->pub.free_in_buffer;
++}
++
++GLOBAL(void)
++jpeg_mem_dest (j_compress_ptr cinfo,
++ unsigned char ** outbuffer, unsigned long * outsize)
++{
++ my_mem_dest_ptr dest;
++
++ if (outbuffer == NULL || outsize == NULL) /* sanity check */
++ ERREXIT(cinfo, JERR_BUFFER_SIZE);
++
++ /* The destination object is made permanent so that multiple JPEG images
++ * can be written to the same buffer without re-executing jpeg_mem_dest.
++ */
++ if (cinfo->dest == NULL) { /* first time for this JPEG object? */
++ cinfo->dest = (struct jpeg_destination_mgr *)
++ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
++ sizeof(my_mem_destination_mgr));
++ }
++
++ dest = (my_mem_dest_ptr) cinfo->dest;
++ dest->pub.init_destination = init_mem_destination;
++ dest->pub.empty_output_buffer = empty_mem_output_buffer;
++ dest->pub.term_destination = term_mem_destination;
++ dest->outbuffer = outbuffer;
++ dest->outsize = outsize;
++ dest->newbuffer = NULL;
++
++ if (*outbuffer == NULL || *outsize == 0) {
++ /* Allocate initial buffer */
++ dest->newbuffer = *outbuffer = (unsigned char *) malloc(OUTPUT_BUF_SIZE);
++ if (dest->newbuffer == NULL)
++ ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
++ *outsize = OUTPUT_BUF_SIZE;
++ }
++
++ dest->pub.next_output_byte = dest->buffer = *outbuffer;
++ dest->pub.free_in_buffer = dest->bufsize = *outsize;
++}
++
--- /dev/null
+--- lcd4linux/drv_SamsungSPF.c 2016-04-21 22:58:57.753031858 +0200
++++ lcd4linux/drv_SamsungSPF_work.c 2016-04-21 23:14:02.685002452 +0200
+@@ -90,6 +90,20 @@
+ .xRes = 1024,
+ .yRes = 600,
+ },
++ {
++ .type = "SPF-87H",
++ .vendorID = 0x04e8,
++ .productID = {0x2033, 0x2034},
++ .xRes = 800,
++ .yRes = 480,
++ },
++ {
++ .type = "SPF-87H(old)",
++ .vendorID = 0x04e8,
++ .productID = {0x2025, 0x2026},
++ .xRes = 800,
++ .yRes = 480,
++ }
+ };
+
+ static int numFrames = sizeof(spfDevices) / sizeof(spfDevices[0]);
+@@ -280,6 +294,15 @@
+ return -1;
+ }
+
++ //Keep SPF87h and friends in MiniMonitorMode
++ char bytes[]={0x09, 0x04};
++
++ if ((ret = usb_control_msg(myDevHandle, 0xc0, 0x01, 0x0000, 0x0000, bytes, 0x02, 1000)) < 0)
++ {
++ error("%s: Error occurred while sending control_msg to device.", Name);
++ error("%s: usb_control_msg returned: %d", Name, ret);
++ };
++
+ return 0;
+ }
+